diff --git a/system/libraries/Calendar.php b/system/libraries/Calendar.php
index 275bf24..924333f 100644
--- a/system/libraries/Calendar.php
+++ b/system/libraries/Calendar.php
@@ -33,7 +33,7 @@
 	var $local_time;
 	var $template		= '';
 	var $start_day		= 'sunday';
-	var $month_type 	= 'long';
+	var $month_type		= 'long';
 	var $day_type		= 'abr';
 	var $show_next_prev	= FALSE;
 	var $next_prev_url	= '';
@@ -46,26 +46,26 @@
 	 * @access	public
 	 */
 	function CI_Calendar($config = array())
-	{		
+	{
 		$this->CI =& get_instance();
-		
+
 		if ( ! in_array('calendar_lang'.EXT, $this->CI->lang->is_loaded, TRUE))
 		{
 			$this->CI->lang->load('calendar');
 		}
 
 		$this->local_time = time();
-		
+
 		if (count($config) > 0)
 		{
 			$this->initialize($config);
 		}
-		
+
 		log_message('debug', "Calendar Class Initialized");
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Initialize the user preferences
 	 *
@@ -74,7 +74,7 @@
 	 * @access	public
 	 * @param	array	config preferences
 	 * @return	void
-	 */	
+	 */
 	function initialize($config = array())
 	{
 		foreach ($config as $key => $val)
@@ -85,7 +85,7 @@
 			}
 		}
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -102,66 +102,66 @@
 		// Set and validate the supplied month/year
 		if ($year == '')
 			$year  = date("Y", $this->local_time);
-			
+
 		if ($month == '')
 			$month = date("m", $this->local_time);
-			
- 		if (strlen($year) == 1)
+
+		if (strlen($year) == 1)
 			$year = '200'.$year;
-		
- 		if (strlen($year) == 2)
+
+		if (strlen($year) == 2)
 			$year = '20'.$year;
 
- 		if (strlen($month) == 1)
+		if (strlen($month) == 1)
 			$month = '0'.$month;
-		
+
 		$adjusted_date = $this->adjust_date($month, $year);
-		
+
 		$month	= $adjusted_date['month'];
 		$year	= $adjusted_date['year'];
-		
+
 		// Determine the total days in the month
 		$total_days = $this->get_total_days($month, $year);
-						
+
 		// Set the starting day of the week
 		$start_days	= array('sunday' => 0, 'monday' => 1, 'tuesday' => 2, 'wednesday' => 3, 'thursday' => 4, 'friday' => 5, 'saturday' => 6);
 		$start_day = ( ! isset($start_days[$this->start_day])) ? 0 : $start_days[$this->start_day];
-		
+
 		// Set the starting day number
 		$local_date = mktime(12, 0, 0, $month, 1, $year);
 		$date = getdate($local_date);
 		$day  = $start_day + 1 - $date["wday"];
-		
+
 		while ($day > 1)
 		{
 			$day -= 7;
 		}
-		
+
 		// Set the current month/year/day
 		// We use this to determine the "today" date
 		$cur_year	= date("Y", $this->local_time);
 		$cur_month	= date("m", $this->local_time);
 		$cur_day	= date("j", $this->local_time);
-		
+
 		$is_current_month = ($cur_year == $year AND $cur_month == $month) ? TRUE : FALSE;
-	
+
 		// Generate the template data array
 		$this->parse_template();
-	
-		// Begin building the calendar output						
-		$out = $this->temp['table_open'];
-		$out .= "\n";	
 
-		$out .= "\n";		
+		// Begin building the calendar output
+		$out = $this->temp['table_open'];
+		$out .= "\n";
+
+		$out .= "\n";
 		$out .= $this->temp['heading_row_start'];
 		$out .= "\n";
-		
+
 		// "previous" month link
 		if ($this->show_next_prev == TRUE)
 		{
 			// Add a trailing slash to the  URL if needed
 			$this->next_prev_url = preg_replace("/(.+?)\/*$/", "\\1/",  $this->next_prev_url);
-		
+
 			$adjusted_date = $this->adjust_date($month - 1, $year);
 			$out .= str_replace('{previous_url}', $this->next_prev_url.$adjusted_date['year'].'/'.$adjusted_date['month'], $this->temp['heading_previous_cell']);
 			$out .= "\n";
@@ -169,26 +169,26 @@
 
 		// Heading containing the month/year
 		$colspan = ($this->show_next_prev == TRUE) ? 5 : 7;
-		
+
 		$this->temp['heading_title_cell'] = str_replace('{colspan}', $colspan, $this->temp['heading_title_cell']);
 		$this->temp['heading_title_cell'] = str_replace('{heading}', $this->get_month_name($month)."&nbsp;".$year, $this->temp['heading_title_cell']);
-		
+
 		$out .= $this->temp['heading_title_cell'];
 		$out .= "\n";
 
 		// "next" month link
 		if ($this->show_next_prev == TRUE)
-		{		
+		{
 			$adjusted_date = $this->adjust_date($month + 1, $year);
 			$out .= str_replace('{next_url}', $this->next_prev_url.$adjusted_date['year'].'/'.$adjusted_date['month'], $this->temp['heading_next_cell']);
 		}
 
-		$out .= "\n";		
+		$out .= "\n";
 		$out .= $this->temp['heading_row_end'];
 		$out .= "\n";
 
 		// Write the cells containing the days of the week
-		$out .= "\n";	
+		$out .= "\n";
 		$out .= $this->temp['week_row_start'];
 		$out .= "\n";
 
@@ -213,11 +213,11 @@
 			for ($i = 0; $i < 7; $i++)
 			{
 				$out .= ($is_current_month == TRUE AND $day == $cur_day) ? $this->temp['cal_cell_start_today'] : $this->temp['cal_cell_start'];
-			
+
 				if ($day > 0 AND $day <= $total_days)
-				{ 					
+				{
 					if (isset($data[$day]))
-					{	
+					{
 						// Cells with content
 						$temp = ($is_current_month == TRUE AND $day == $cur_day) ? $this->temp['cal_cell_content_today'] : $this->temp['cal_cell_content'];
 						$out .= str_replace('{day}', $day, str_replace('{content}', $data[$day], $temp));
@@ -234,22 +234,22 @@
 					// Blank cells
 					$out .= $this->temp['cal_cell_blank'];
 				}
-				
-				$out .= ($is_current_month == TRUE AND $day == $cur_day) ? $this->temp['cal_cell_end_today'] : $this->temp['cal_cell_end'];					  	
+
+				$out .= ($is_current_month == TRUE AND $day == $cur_day) ? $this->temp['cal_cell_end_today'] : $this->temp['cal_cell_end'];					
 				$day++;
 			}
-			
-			$out .= "\n";		
+
+			$out .= "\n";
 			$out .= $this->temp['cal_row_end'];
-			$out .= "\n";		
+			$out .= "\n";
 		}
 
-		$out .= "\n";		
+		$out .= "\n";
 		$out .= $this->temp['table_close'];
 
 		return $out;
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -272,9 +272,9 @@
 		{
 			$month_names = array('01' => 'cal_january', '02' => 'cal_february', '03' => 'cal_march', '04' => 'cal_april', '05' => 'cal_mayl', '06' => 'cal_june', '07' => 'cal_july', '08' => 'cal_august', '09' => 'cal_september', '10' => 'cal_october', '11' => 'cal_november', '12' => 'cal_december');
 		}
-		
+
 		$month = $month_names[$month];
-		
+
 		if ($this->CI->lang->line($month) === FALSE)
 		{
 			return ucfirst(str_replace('cal_', '', $month));
@@ -282,7 +282,7 @@
 
 		return $this->CI->lang->line($month);
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -299,7 +299,7 @@
 	{
 		if ($day_type != '')
 			$this->day_type = $day_type;
-	
+
 		if ($this->day_type == 'long')
 		{
 			$day_names = array('sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday');
@@ -312,16 +312,16 @@
 		{
 			$day_names = array('su', 'mo', 'tu', 'we', 'th', 'fr', 'sa');
 		}
-	
+
 		$days = array();
 		foreach ($day_names as $val)
-		{			
+		{
 			$days[] = ($this->CI->lang->line('cal_'.$val) === FALSE) ? ucfirst($val) : $this->CI->lang->line('cal_'.$val);
 		}
-	
+
 		return $days;
 	}
- 	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -362,7 +362,7 @@
 
 		return $date;
 	}
- 	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -393,7 +393,7 @@
 
 		return $days_in_month[$month - 1];
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -407,17 +407,17 @@
 	function default_template()
 	{
 		return  array (
-						'table_open' 				=> '<table border="0" cellpadding="4" cellspacing="0">',
-						'heading_row_start' 		=> '<tr>',
+						'table_open'				=> '<table border="0" cellpadding="4" cellspacing="0">',
+						'heading_row_start'			=> '<tr>',
 						'heading_previous_cell'		=> '<th><a href="{previous_url}">&lt;&lt;</a></th>',
-						'heading_title_cell' 		=> '<th colspan="{colspan}">{heading}</th>',
-						'heading_next_cell' 		=> '<th><a href="{next_url}">&gt;&gt;</a></th>',
-						'heading_row_end' 			=> '</tr>',
-						'week_row_start' 			=> '<tr>',
-						'week_day_cell' 			=> '<td>{week_day}</td>',
-						'week_row_end' 				=> '</tr>',
-						'cal_row_start' 			=> '<tr>',
-						'cal_cell_start' 			=> '<td>',
+						'heading_title_cell'		=> '<th colspan="{colspan}">{heading}</th>',
+						'heading_next_cell'			=> '<th><a href="{next_url}">&gt;&gt;</a></th>',
+						'heading_row_end'			=> '</tr>',
+						'week_row_start'			=> '<tr>',
+						'week_day_cell'				=> '<td>{week_day}</td>',
+						'week_row_end'				=> '</tr>',
+						'cal_row_start'				=> '<tr>',
+						'cal_cell_start'			=> '<td>',
 						'cal_cell_start_today'		=> '<td>',
 						'cal_cell_content'			=> '<a href="{content}">{day}</a>',
 						'cal_cell_content_today'	=> '<a href="{content}"><strong>{day}</strong></a>',
@@ -428,9 +428,9 @@
 						'cal_cell_end_today'		=> '</td>',
 						'cal_row_end'				=> '</tr>',
 						'table_close'				=> '</table>'
-					);	
+					);
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -442,17 +442,17 @@
 	 * @access	public
 	 * @return	void
 	 */
- 	function parse_template()
- 	{
+	function parse_template()
+	{
 		$this->temp = $this->default_template();
- 	
- 		if ($this->template == '')
- 		{
- 			return;
- 		}
- 		
+
+		if ($this->template == '')
+		{
+			return;
+		}
+
 		$today = array('cal_cell_start_today', 'cal_cell_content_today', 'cal_cell_no_content_today', 'cal_cell_end_today');
-		
+
 		foreach (array('table_open', 'table_close', 'heading_row_start', 'heading_previous_cell', 'heading_title_cell', 'heading_next_cell', 'heading_row_end', 'week_row_start', 'week_day_cell', 'week_row_end', 'cal_row_start', 'cal_cell_start', 'cal_cell_content', 'cal_cell_no_content',  'cal_cell_blank', 'cal_cell_end', 'cal_row_end', 'cal_cell_start_today', 'cal_cell_content_today', 'cal_cell_no_content_today', 'cal_cell_end_today') as $val)
 		{
 			if (preg_match("/\{".$val."\}(.*?)\{\/".$val."\}/si", $this->template, $match))
@@ -466,8 +466,8 @@
 					$this->temp[$val] = $this->temp[str_replace('_today', '', $val)];
 				}
 			}
-		} 	
- 	}
+		}
+	}
 
 }
 
diff --git a/system/libraries/Cart.php b/system/libraries/Cart.php
index 643d2ec..f3969ef 100644
--- a/system/libraries/Cart.php
+++ b/system/libraries/Cart.php
@@ -29,7 +29,7 @@
 	// These are the regular expression rules that we use to validate the product ID and product name
 	var $product_id_rules	= '\.a-z0-9_-'; // alpha-numeric, dashes, underscores, or periods
 	var $product_name_rules	= '\.\:\-_ a-z0-9'; // alpha-numeric, dashes, underscores, colons or periods
-	
+
 	// Private variables.  Do not change!
 	var $CI;
 	var $_cart_contents	= array();
@@ -39,12 +39,12 @@
 	 * Shopping Class Constructor
 	 *
 	 * The constructor loads the Session class, used to store the shopping cart contents.
-	 */		
+	 */
 	function CI_Cart($params = array())
-	{	
+	{
 		// Set the super object to a local variable for use later
 		$this->CI =& get_instance();
-		
+
 		// Are any config settings being passed manually?  If so, set them
 		$config = array();
 		if (count($params) > 0)
@@ -54,10 +54,10 @@
 				$config[$key] = $val;
 			}
 		}
-		
+
 		// Load the Sessions class
 		$this->CI->load->library('session', $config);
-			
+
 		// Grab the shopping cart array from the session table, if it exists
 		if ($this->CI->session->userdata('cart_contents') !== FALSE)
 		{
@@ -66,15 +66,15 @@
 		else
 		{
 			// No cart exists so we'll set some base values
-			$this->_cart_contents['cart_total'] = 0;		
-			$this->_cart_contents['total_items'] = 0;		
+			$this->_cart_contents['cart_total'] = 0;
+			$this->_cart_contents['total_items'] = 0;
 		}
-	
+
 		log_message('debug', "Cart Class Initialized");
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Insert items into the cart and save it to the session table
 	 *
@@ -90,15 +90,15 @@
 			log_message('error', 'The insert method must be passed an array containing data.');
 			return FALSE;
 		}
-				
-		// You can either insert a single product using a one-dimensional array, 
+
+		// You can either insert a single product using a one-dimensional array,
 		// or multiple products using a multi-dimensional one. The way we
 		// determine the array type is by looking for a required array key named "id"
 		// at the top level. If it's not found, we will assume it's a multi-dimensional array.
-	
-		$save_cart = FALSE;		
+
+		$save_cart = FALSE;
 		if (isset($items['id']))
-		{			
+		{
 			if ($this->_insert($items) == TRUE)
 			{
 				$save_cart = TRUE;
@@ -114,7 +114,7 @@
 					{
 						$save_cart = TRUE;
 					}
-				}			
+				}
 			}
 		}
 
@@ -129,7 +129,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Insert
 	 *
@@ -145,9 +145,9 @@
 			log_message('error', 'The insert method must be passed an array containing data.');
 			return FALSE;
 		}
-		
+
 		// --------------------------------------------------------------------
-	
+
 		// Does the $items array contain an id, quantity, price, and name?  These are required
 		if ( ! isset($items['id']) OR ! isset($items['qty']) OR ! isset($items['price']) OR ! isset($items['name']))
 		{
@@ -156,7 +156,7 @@
 		}
 
 		// --------------------------------------------------------------------
-	
+
 		// Prep the quantity. It can only be a number.  Duh...
 		$items['qty'] = trim(preg_replace('/([^0-9])/i', '', $items['qty']));
 		// Trim any leading zeros
@@ -167,9 +167,9 @@
 		{
 			return FALSE;
 		}
-				
+
 		// --------------------------------------------------------------------
-	
+
 		// Validate the product ID. It can only be alpha-numeric, dashes, underscores or periods
 		// Not totally sure we should impose this rule, but it seems prudent to standardize IDs.
 		// Note: These can be user-specified by setting the $this->product_id_rules variable.
@@ -180,7 +180,7 @@
 		}
 
 		// --------------------------------------------------------------------
-	
+
 		// Validate the product name. It can only be alpha-numeric, dashes, underscores, colons or periods.
 		// Note: These can be user-specified by setting the $this->product_name_rules variable.
 		if ( ! preg_match("/^[".$this->product_name_rules."]+$/i", $items['name']))
@@ -195,7 +195,7 @@
 		$items['price'] = trim(preg_replace('/([^0-9\.])/i', '', $items['price']));
 		// Trim any leading zeros
 		$items['price'] = trim(preg_replace('/(^[0]+)/i', '', $items['price']));
-		
+
 		// Is the price a valid number?
 		if ( ! is_numeric($items['price']))
 		{
@@ -204,13 +204,13 @@
 		}
 
 		// --------------------------------------------------------------------
-		
+
 		// We now need to create a unique identifier for the item being inserted into the cart.
-		// Every time something is added to the cart it is stored in the master cart array.  
-		// Each row in the cart array, however, must have a unique index that identifies not only 
-		// a particular product, but makes it possible to store identical products with different options.  
-		// For example, what if someone buys two identical t-shirts (same product ID), but in 
-		// different sizes?  The product ID (and other attributes, like the name) will be identical for 
+		// Every time something is added to the cart it is stored in the master cart array.
+		// Each row in the cart array, however, must have a unique index that identifies not only
+		// a particular product, but makes it possible to store identical products with different options.
+		// For example, what if someone buys two identical t-shirts (same product ID), but in
+		// different sizes?  The product ID (and other attributes, like the name) will be identical for
 		// both sizes because it's the same shirt. The only difference will be the size.
 		// Internally, we need to treat identical submissions, but with different options, as a unique product.
 		// Our solution is to convert the options array to a string and MD5 it along with the product ID.
@@ -225,19 +225,19 @@
 			// Technically, we don't need to MD5 the ID in this case, but it makes
 			// sense to standardize the format of array indexes for both conditions
 			$rowid = md5($items['id']);
-		}		
+		}
 
 		// --------------------------------------------------------------------
 
 		// Now that we have our unique "row ID", we'll add our cart items to the master array
-		
+
 		// let's unset this first, just to make sure our index contains only the data from this submission
-		unset($this->_cart_contents[$rowid]);		
-		
+		unset($this->_cart_contents[$rowid]);
+
 		// Create a new index with our new row ID
 		$this->_cart_contents[$rowid]['rowid'] = $rowid;
-	
-		// And add the new items to the cart array			
+
+		// And add the new items to the cart array
 		foreach ($items as $key => $val)
 		{
 			$this->_cart_contents[$rowid][$key] = $val;
@@ -248,11 +248,11 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Update the cart
 	 *
-	 * This function permits the quantity of a given item to be changed. 
+	 * This function permits the quantity of a given item to be changed.
 	 * Typically it is called from the "view cart" page if a user makes
 	 * changes to the quantity before checkout. That array must contain the
 	 * product ID and quantity for each item.
@@ -269,8 +269,8 @@
 		{
 			return FALSE;
 		}
-			
-		// You can either update a single product using a one-dimensional array, 
+
+		// You can either update a single product using a one-dimensional array,
 		// or multiple products using a multi-dimensional one.  The way we
 		// determine the array type is by looking for a required array key named "id".
 		// If it's not found we assume it's a multi-dimensional array
@@ -292,7 +292,7 @@
 					{
 						$save_cart = TRUE;
 					}
-				}			
+				}
 			}
 		}
 
@@ -307,11 +307,11 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Update the cart
 	 *
-	 * This function permits the quantity of a given item to be changed. 
+	 * This function permits the quantity of a given item to be changed.
 	 * Typically it is called from the "view cart" page if a user makes
 	 * changes to the quantity before checkout. That array must contain the
 	 * product ID and quantity for each item.
@@ -319,7 +319,7 @@
 	 * @access	private
 	 * @param	array
 	 * @return	bool
-	 */	
+	 */
 	function _update($items = array())
 	{
 		// Without these array indexes there is nothing we can do
@@ -327,7 +327,7 @@
 		{
 			return FALSE;
 		}
-		
+
 		// Prep the quantity
 		$items['qty'] = preg_replace('/([^0-9])/i', '', $items['qty']);
 
@@ -336,7 +336,7 @@
 		{
 			return FALSE;
 		}
-		
+
 		// Is the new quantity different than what is already saved in the cart?
 		// If it's the same there's nothing to do
 		if ($this->_cart_contents[$items['rowid']]['qty'] == $items['qty'])
@@ -348,18 +348,18 @@
 		// If the quantity is greater than zero we are updating
 		if ($items['qty'] == 0)
 		{
-			unset($this->_cart_contents[$items['rowid']]);		
+			unset($this->_cart_contents[$items['rowid']]);
 		}
 		else
 		{
 			$this->_cart_contents[$items['rowid']]['qty'] = $items['qty'];
 		}
-		
+
 		return TRUE;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Save the cart array to the session DB
 	 *
@@ -383,20 +383,20 @@
 			}
 
 			$total += ($val['price'] * $val['qty']);
-			
+
 			// Set the subtotal
 			$this->_cart_contents[$key]['subtotal'] = ($this->_cart_contents[$key]['price'] * $this->_cart_contents[$key]['qty']);
 		}
 
 		// Set the cart total and total items.
-		$this->_cart_contents['total_items'] = count($this->_cart_contents);			
+		$this->_cart_contents['total_items'] = count($this->_cart_contents);
 		$this->_cart_contents['cart_total'] = $total;
-	
+
 		// Is our cart empty?  If so we delete it from the session
 		if (count($this->_cart_contents) <= 2)
 		{
 			$this->CI->session->unset_userdata('cart_contents');
-			
+
 			// Nothing more to do... coffee time!
 			return FALSE;
 		}
@@ -406,11 +406,11 @@
 		$this->CI->session->set_userdata(array('cart_contents' => $this->_cart_contents));
 
 		// Woot!
-		return TRUE;	
+		return TRUE;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Cart Total
 	 *
@@ -423,7 +423,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Total Items
 	 *
@@ -438,7 +438,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Cart Contents
 	 *
@@ -450,16 +450,16 @@
 	function contents()
 	{
 		$cart = $this->_cart_contents;
-		
+
 		// Remove these so they don't create a problem when showing the cart table
 		unset($cart['total_items']);
 		unset($cart['cart_total']);
-	
+
 		return $cart;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Has options
 	 *
@@ -475,12 +475,12 @@
 		{
 			return FALSE;
 		}
-		
+
 		return TRUE;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Product options
 	 *
@@ -500,7 +500,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Format Number
 	 *
@@ -515,15 +515,15 @@
 		{
 			return '';
 		}
-	
+
 		// Remove anything that isn't a number or decimal point.
 		$n = trim(preg_replace('/([^0-9\.])/i', '', $n));
-	
+
 		return number_format($n, 2, '.', ',');
 	}
-		
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Destroy the cart
 	 *
@@ -535,9 +535,9 @@
 	function destroy()
 	{
 		unset($this->_cart_contents);
-	
-		$this->_cart_contents['cart_total'] = 0;		
-		$this->_cart_contents['total_items'] = 0;		
+
+		$this->_cart_contents['cart_total'] = 0;
+		$this->_cart_contents['total_items'] = 0;
 
 		$this->CI->session->unset_userdata('cart_contents');
 	}
diff --git a/system/libraries/Driver.php b/system/libraries/Driver.php
index 07ef2e7..1261b4c 100644
--- a/system/libraries/Driver.php
+++ b/system/libraries/Driver.php
@@ -25,25 +25,25 @@
  * @subpackage	Libraries
  * @category	Libraries
  * @author		EllisLab Dev Team
- * @link		
+ * @link
  */
 class CI_Driver_Library {
 
 	protected $valid_drivers	= array();
 	protected static $lib_name;
-	
+
 	// The first time a child is used it won't exist, so we instantiate it
 	// subsequents calls will go straight to the proper child.
 	function __get($child)
 	{
 		if (! isset($this->lib_name))
 		{
-			$this->lib_name = get_class($this);				
+			$this->lib_name = get_class($this);
 		}
 
 		// The class will be prefixed with the parent lib
 		$child_class = $this->lib_name.'_'.$child;
-		
+
 		if (in_array(strtolower($child_class), array_map('strtolower', $this->valid_drivers)))
 		{
 			// check and see if the driver is in a separate file
@@ -64,11 +64,11 @@
 							{
 								include_once $filepath;
 								break;
-							}							
+							}
 						}
 					}
 				}
-				
+
 				// it's a valid driver, but the file simply can't be found
 				if ( ! class_exists($child_class))
 				{
@@ -82,14 +82,14 @@
 			$this->$child = $obj;
 			return $this->$child;
 		}
-		
+
 		// The requested driver isn't valid!
 		log_message('error', "Invalid driver requested: ".$child_class);
 		show_error("Invalid driver requested: ".$child_class);
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 }
 // END CI_Driver_Library CLASS
 
@@ -104,11 +104,11 @@
  * @subpackage	Libraries
  * @category	Libraries
  * @author		EllisLab Dev Team
- * @link		
+ * @link
  */
 class CI_Driver {
 	protected $parent;
-			
+
 	private $methods = array();
 	private $properties = array();
 
@@ -126,16 +126,16 @@
 	function decorate($parent)
 	{
 		$this->parent = $parent;
-		
+
 		// Lock down attributes to what is defined in the class
 		// and speed up references in magic methods
-		
+
 		$class_name = get_class($parent);
-		
+
 		if ( ! isset(self::$reflections[$class_name]))
 		{
 			$r = new ReflectionObject($parent);
-			
+
 			foreach ($r->getMethods() as $method)
 			{
 				if ($method->isPublic())
@@ -151,7 +151,7 @@
 					$this->properties[] = $prop->getName();
 				}
 			}
-			
+
 			self::$reflections[$class_name] = array($this->methods, $this->properties);
 		}
 		else
@@ -159,9 +159,9 @@
 			list($this->methods, $this->properties) = self::$reflections[$class_name];
 		}
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * __call magic method
 	 *
@@ -185,7 +185,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * __get magic method
 	 *
@@ -204,7 +204,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * __set magic method
 	 *
@@ -222,9 +222,9 @@
 			$this->parent->$var = $val;
 		}
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 }
 // END CI_Driver CLASS
 
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index af48757..6c0309b 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -129,7 +129,7 @@
 		$this->_smtp_auth = ($this->smtp_user == '' AND $this->smtp_pass == '') ? FALSE : TRUE;
 		$this->_safe_mode = ((boolean)@ini_get("safe_mode") === FALSE) ? FALSE : TRUE;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -161,7 +161,7 @@
 			$this->_attach_disp = array();
 		}
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -202,7 +202,7 @@
 		$this->_set_header('From', $name.' <'.$from.'>');
 		$this->_set_header('Return-Path', '<'.$from.'>');
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -238,7 +238,7 @@
 		$this->_set_header('Reply-To', $name.' <'.$replyto.'>');
 		$this->_replyto_flag = TRUE;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -273,7 +273,7 @@
 			break;
 		}
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -300,7 +300,7 @@
 			$this->_cc_array = $cc;
 		}
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -336,7 +336,7 @@
 			$this->_set_header('Bcc', implode(", ", $bcc));
 		}
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -351,7 +351,7 @@
 		$subject = $this->_prep_q_encoding($subject);
 		$this->_set_header('Subject', $subject);
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -365,7 +365,7 @@
 	{
 		$this->_body = stripslashes(rtrim(str_replace("\r", "", $body)));
 	}
- 
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -396,7 +396,7 @@
 	{
 		$this->_headers[$header] = $value;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -422,7 +422,7 @@
 		}
 		return $email;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -436,7 +436,7 @@
 	{
 		$this->alt_message = ($str == '') ? '' : $str;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -450,7 +450,7 @@
 	{
 		$this->mailtype = ($type == 'html') ? 'html' : 'text';
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -464,7 +464,7 @@
 	{
 		$this->wordwrap = ($wordwrap === FALSE) ? FALSE : TRUE;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -478,7 +478,7 @@
 	{
 		$this->protocol = ( ! in_array($protocol, $this->_protocols, TRUE)) ? 'mail' : strtolower($protocol);
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -504,7 +504,7 @@
 
 		$this->priority = $n;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -524,7 +524,7 @@
 
 		$this->newline	= $newline;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -544,7 +544,7 @@
 
 		$this->crlf	= $crlf;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -558,7 +558,7 @@
 		$this->_alt_boundary = "B_ALT_".uniqid(''); // multipart/alternative
 		$this->_atc_boundary = "B_ATC_".uniqid(''); // attachment boundary
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -575,7 +575,7 @@
 
 		return  "<".uniqid('').strstr($from, '@').">";
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -595,7 +595,7 @@
 			return $this->protocol;
 		}
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -650,7 +650,7 @@
 			return 'plain';
 		}
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -668,7 +668,7 @@
 
 		return sprintf("%s %s%04d", date("D, j M Y H:i:s"), $operator, $timezone);
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -681,7 +681,7 @@
 	{
 		return "This is a multi-part message in MIME format.".$this->newline."Your email application may not support this format.";
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -710,7 +710,7 @@
 
 		return TRUE;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -724,7 +724,7 @@
 	{
 		return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $address)) ? FALSE : TRUE;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -740,11 +740,11 @@
 		{
 			if (preg_match('/\<(.*)\>/', $email, $match))
 			{
-		   		return $match['1'];
+				return $match['1'];
 			}
-		   	else
+			else
 			{
-		   		return $email;
+				return $email;
 			}
 		}
 
@@ -754,17 +754,17 @@
 		{
 			if (preg_match( '/\<(.*)\>/', $addy, $match))
 			{
-		   		$clean_email[] = $match['1'];
+				$clean_email[] = $match['1'];
 			}
-		   	else
+			else
 			{
-		   		$clean_email[] = $addy;
+				$clean_email[] = $addy;
 			}
 		}
 
 		return $clean_email;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -804,7 +804,7 @@
 
 			for ($x = 1; $x <= $i; $x ++)
 			{
-				 $n .= "\n";
+				$n .= "\n";
 			}
 
 			$body = str_replace($n, "\n\n", $body);
@@ -812,7 +812,7 @@
 
 		return $this->word_wrap($body, '76');
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -908,7 +908,7 @@
 
 		return $output;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -926,7 +926,7 @@
 		$this->_set_header('Message-ID', $this->_get_message_id());
 		$this->_set_header('Mime-Version', '1.0');
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -961,7 +961,7 @@
 			$this->_header_str = rtrim($this->_header_str);
 		}
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -1150,7 +1150,7 @@
 
 		return;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -1245,7 +1245,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Prep Q Encoding
 	 *
@@ -1317,7 +1317,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Send Email
 	 *
@@ -1358,7 +1358,7 @@
 			return TRUE;
 		}
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -1416,7 +1416,7 @@
 			$this->_spool_email();
 		}
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -1429,7 +1429,7 @@
 	{
 		$this->_finalbody = preg_replace_callback("/\{unwrap\}(.*?)\{\/unwrap\}/si", array($this, '_remove_nl_callback'), $this->_finalbody);
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -1447,7 +1447,7 @@
 
 		return $matches[1];
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -1492,7 +1492,7 @@
 		$this->_set_error_message('email_sent', $this->_get_protocol());
 		return TRUE;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -1528,7 +1528,7 @@
 			}
 		}
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -1550,12 +1550,12 @@
 		fputs($fp, $this->_header_str);
 		fputs($fp, $this->_finalbody);
 
-	    $status = pclose($fp);
-	    
+		$status = pclose($fp);
+	
 		if (version_compare(PHP_VERSION, '4.2.3') == -1)
 		{
 			$status = $status >> 8 & 0xFF;
-	    }
+		}
 
 		if ($status != 0)
 		{
@@ -1566,7 +1566,7 @@
 
 		return TRUE;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -1635,7 +1635,7 @@
 		$this->_send_command('quit');
 		return TRUE;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -1662,7 +1662,7 @@
 		$this->_set_error_message($this->_get_smtp_data());
 		return $this->_send_command('hello');
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -1729,7 +1729,7 @@
 
 		return TRUE;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -1783,7 +1783,7 @@
 
 		return TRUE;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -1804,7 +1804,7 @@
 			return TRUE;
 		}
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -1829,7 +1829,7 @@
 
 		return $data;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -1842,7 +1842,7 @@
 	{
 		return (isset($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : 'localhost.localdomain';
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -1862,7 +1862,7 @@
 		$rip = (isset($_SERVER['REMOTE_ADDR']) AND $_SERVER['REMOTE_ADDR'] != "") ? $_SERVER['REMOTE_ADDR'] : FALSE;
 		$fip = (isset($_SERVER['HTTP_X_FORWARDED_FOR']) AND $_SERVER['HTTP_X_FORWARDED_FOR'] != "") ? $_SERVER['HTTP_X_FORWARDED_FOR'] : FALSE;
 
-		if ($cip && $rip) 	$this->_IP = $cip;
+		if ($cip && $rip)	$this->_IP = $cip;
 		elseif ($rip)		$this->_IP = $rip;
 		elseif ($cip)		$this->_IP = $cip;
 		elseif ($fip)		$this->_IP = $fip;
@@ -1884,7 +1884,7 @@
 
 		return $this->_IP;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -1908,7 +1908,7 @@
 		$msg .= "<pre>".$this->_header_str."\n".htmlspecialchars($this->_subject)."\n".htmlspecialchars($this->_finalbody).'</pre>';
 		return $msg;
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -1932,7 +1932,7 @@
 			$this->_debug_msg[] = str_replace('%s', $val, $line)."<br />";
 		}
 	}
-  
+
 	// --------------------------------------------------------------------
 
 	/**
diff --git a/system/libraries/Encrypt.php b/system/libraries/Encrypt.php
index b27847a..b95dd99 100644
--- a/system/libraries/Encrypt.php
+++ b/system/libraries/Encrypt.php
@@ -144,7 +144,7 @@
 	function decode($string, $key = '')
 	{
 		$key = $this->get_key($key);
-		
+
 		if (preg_match('/[^a-zA-Z0-9\/\+=]/', $string))
 		{
 			return FALSE;
@@ -163,12 +163,12 @@
 		{
 			$dec = $this->_xor_decode($dec, $key);
 		}
-		
+
 		return $dec;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Encode from Legacy
 	 *
@@ -176,7 +176,7 @@
 	 * returns a newly encoded string using the improved method added in 2.0.0
 	 * This allows for backwards compatibility and a method to transition to the
 	 * new encryption algorithms.
-	 * 
+	 *
 	 * For more details, see http://codeigniter.com/user_guide/installation/upgrade_200.html#encryption
 	 *
 	 * @access	public
@@ -192,22 +192,22 @@
 			log_message('error', 'Encoding from legacy is available only when Mcrypt is in use.');
 			return FALSE;
 		}
-		
+
 		// decode it first
 		// set mode temporarily to what it was when string was encoded with the legacy
-		// algorithm - typically MCRYPT_MODE_ECB 
+		// algorithm - typically MCRYPT_MODE_ECB
 		$current_mode = $this->_get_mode();
 		$this->set_mode($legacy_mode);
-		
+
 		$key = $this->get_key($key);
-		
+
 		if (preg_match('/[^a-zA-Z0-9\/\+=]/', $string))
 		{
 			return FALSE;
 		}
 
 		$dec = base64_decode($string);
-		
+
 		if (($dec = $this->mcrypt_decode($dec, $key)) === FALSE)
 		{
 			return FALSE;
@@ -223,7 +223,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * XOR Encode
 	 *
@@ -247,7 +247,7 @@
 
 		$enc = '';
 		for ($i = 0; $i < strlen($string); $i++)
-		{			
+		{
 			$enc .= substr($rand, ($i % strlen($rand)), 1).(substr($rand, ($i % strlen($rand)), 1) ^ substr($string, $i, 1));
 		}
 
@@ -410,7 +410,7 @@
 			{
 				$temp = $temp + 256;
 			}
-			
+
 			$str .= chr($temp);
 		}
 
@@ -418,7 +418,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set the Mcrypt Cipher
 	 *
@@ -477,7 +477,7 @@
 		{
 			$this->_mcrypt_mode = MCRYPT_MODE_CBC;
 		}
-		
+
 		return $this->_mcrypt_mode;
 	}
 
@@ -503,7 +503,7 @@
 	 * @access	public
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function hash($str)
 	{
 		return ($this->_hash_type == 'sha1') ? $this->sha1($str) : md5($str);
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 64baaef..566655b 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -25,29 +25,29 @@
  * @link		http://codeigniter.com/user_guide/libraries/form_validation.html
  */
 class CI_Form_validation {
-	
+
 	var $CI;
-	var $_field_data			= array();	
+	var $_field_data			= array();
 	var $_config_rules			= array();
 	var $_error_array			= array();
-	var $_error_messages		= array();	
+	var $_error_messages		= array();
 	var $_error_prefix			= '<p>';
 	var $_error_suffix			= '</p>';
 	var $error_string			= '';
-	var $_safe_form_data 		= FALSE;
+	var $_safe_form_data		= FALSE;
 
 
 	/**
 	 * Constructor
 	 *
-	 */	
+	 */
 	function CI_Form_validation($rules = array())
-	{	
+	{
 		$this->CI =& get_instance();
-		
+
 		// Validation rules can be stored in a config file.
 		$this->_config_rules = $rules;
-		
+
 		// Automatically load the form helper
 		$this->CI->load->helper('form');
 
@@ -56,12 +56,12 @@
 		{
 			mb_internal_encoding($this->CI->config->item('charset'));
 		}
-	
+
 		log_message('debug', "Form Validation Class Initialized");
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set Rules
 	 *
@@ -80,7 +80,7 @@
 		{
 			return;
 		}
-	
+
 		// If an array was passed via the first parameter instead of indidual string
 		// values we cycle through it and recursively call this function.
 		if (is_array($field))
@@ -101,7 +101,7 @@
 			}
 			return;
 		}
-		
+
 		// No fields? Nothing to do...
 		if ( ! is_string($field) OR  ! is_string($rules) OR $field == '')
 		{
@@ -113,9 +113,9 @@
 
 		// Is the field name an array?  We test for the existence of a bracket "[" in
 		// the field name to determine this.  If it is an array, we break it apart
-		// into its components so that we can fetch the corresponding POST data later		
+		// into its components so that we can fetch the corresponding POST data later
 		if (strpos($field, '[') !== FALSE AND preg_match_all('/\[(.*?)\]/', $field, $matches))
-		{	
+		{
 			// Note: Due to a bug in current() that affects some versions
 			// of PHP we can not pass function call directly into it
 			$x = explode('[', $field);
@@ -128,19 +128,19 @@
 					$indexes[] = $matches['1'][$i];
 				}
 			}
-			
+
 			$is_array = TRUE;
 		}
 		else
 		{
-			$indexes 	= array();
-			$is_array	= FALSE;		
+			$indexes	= array();
+			$is_array	= FALSE;
 		}
-		
-		// Build our master array		
+
+		// Build our master array
 		$this->_field_data[$field] = array(
-											'field'				=> $field, 
-											'label'				=> $label, 
+											'field'				=> $field,
+											'label'				=> $label,
 											'rules'				=> $rules,
 											'is_array'			=> $is_array,
 											'keys'				=> $indexes,
@@ -150,7 +150,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set Error Message
 	 *
@@ -168,12 +168,12 @@
 		{
 			$lang = array($lang => $val);
 		}
-	
+
 		$this->_error_messages = array_merge($this->_error_messages, $lang);
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set The Error Delimiter
 	 *
@@ -183,7 +183,7 @@
 	 * @param	string
 	 * @param	string
 	 * @return	void
-	 */	
+	 */
 	function set_error_delimiters($prefix = '<p>', $suffix = '</p>')
 	{
 		$this->_error_prefix = $prefix;
@@ -191,7 +191,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Get Error Message
 	 *
@@ -200,14 +200,14 @@
 	 * @access	public
 	 * @param	string	the field name
 	 * @return	void
-	 */	
+	 */
 	function error($field = '', $prefix = '', $suffix = '')
-	{	
+	{
 		if ( ! isset($this->_field_data[$field]['error']) OR $this->_field_data[$field]['error'] == '')
 		{
 			return '';
 		}
-		
+
 		if ($prefix == '')
 		{
 			$prefix = $this->_error_prefix;
@@ -222,7 +222,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Error String
 	 *
@@ -232,7 +232,7 @@
 	 * @param	string
 	 * @param	string
 	 * @return	str
-	 */	
+	 */
 	function error_string($prefix = '', $suffix = '')
 	{
 		// No errrors, validation passes!
@@ -240,7 +240,7 @@
 		{
 			return '';
 		}
-		
+
 		if ($prefix == '')
 		{
 			$prefix = $this->_error_prefix;
@@ -250,7 +250,7 @@
 		{
 			$suffix = $this->_error_suffix;
 		}
-		
+
 		// Generate the error string
 		$str = '';
 		foreach ($this->_error_array as $val)
@@ -260,12 +260,12 @@
 				$str .= $prefix.$val.$suffix."\n";
 			}
 		}
-		
+
 		return $str;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Run the Validator
 	 *
@@ -273,7 +273,7 @@
 	 *
 	 * @access	public
 	 * @return	bool
-	 */		
+	 */
 	function run($group = '')
 	{
 		// Do we even have any data to process?  Mm?
@@ -281,7 +281,7 @@
 		{
 			return FALSE;
 		}
-		
+
 		// Does the _field_data array containing the validation rules exist?
 		// If not, we look to see if they were assigned via a config file
 		if (count($this->_field_data) == 0)
@@ -291,10 +291,10 @@
 			{
 				return FALSE;
 			}
-			
+
 			// Is there a validation rule for the particular URI being accessed?
 			$uri = ($group == '') ? trim($this->CI->uri->ruri_string(), '/') : $group;
-			
+
 			if ($uri != '' AND isset($this->_config_rules[$uri]))
 			{
 				$this->set_rules($this->_config_rules[$uri]);
@@ -303,7 +303,7 @@
 			{
 				$this->set_rules($this->_config_rules);
 			}
-	
+
 			// We're we able to set the rules correctly?
 			if (count($this->_field_data) == 0)
 			{
@@ -311,17 +311,17 @@
 				return FALSE;
 			}
 		}
-	
+
 		// Load the language file containing error messages
 		$this->CI->lang->load('form_validation');
-							
-		// Cycle through the rules for each field, match the 
+
+		// Cycle through the rules for each field, match the
 		// corresponding $_POST item and test for errors
 		foreach ($this->_field_data as $field => $row)
-		{		
+		{
 			// Fetch the data from the corresponding $_POST array and cache it in the _field_data array.
 			// Depending on whether the field name is an array or a string will determine where we get it from.
-			
+
 			if ($row['is_array'] == TRUE)
 			{
 				$this->_field_data[$field]['postdata'] = $this->_reduce_array($_POST, $row['keys']);
@@ -333,8 +333,8 @@
 					$this->_field_data[$field]['postdata'] = $_POST[$field];
 				}
 			}
-		
-			$this->_execute($row, explode('|', $row['rules']), $this->_field_data[$field]['postdata']);		
+
+			$this->_execute($row, explode('|', $row['rules']), $this->_field_data[$field]['postdata']);
 		}
 
 		// Did we end up with any errors?
@@ -347,7 +347,7 @@
 
 		// Now we need to re-set the POST data with the new, processed data
 		$this->_reset_post_array();
-		
+
 		// No errors, validation passes!
 		if ($total_errors == 0)
 		{
@@ -359,7 +359,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Traverse a multidimensional $_POST array index until the data is found
 	 *
@@ -368,7 +368,7 @@
 	 * @param	array
 	 * @param	integer
 	 * @return	mixed
-	 */		
+	 */
 	function _reduce_array($array, $keys, $i = 0)
 	{
 		if (is_array($array))
@@ -389,18 +389,18 @@
 				return $array;
 			}
 		}
-	
+
 		return $array;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Re-populate the _POST array with our finalized and processed data
 	 *
 	 * @access	private
 	 * @return	null
-	 */		
+	 */
 	function _reset_post_array()
 	{
 		foreach ($this->_field_data as $field => $row)
@@ -418,7 +418,7 @@
 				{
 					// start with a reference
 					$post_ref =& $_POST;
-					
+
 					// before we assign values, make a reference to the right POST key
 					if (count($row['keys']) == 1)
 					{
@@ -452,7 +452,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Executes the Validation routines
 	 *
@@ -462,21 +462,21 @@
 	 * @param	mixed
 	 * @param	integer
 	 * @return	mixed
-	 */	
+	 */
 	function _execute($row, $rules, $postdata = NULL, $cycles = 0)
 	{
 		// If the $_POST data is an array we will run a recursive call
 		if (is_array($postdata))
-		{ 
+		{
 			foreach ($postdata as $key => $val)
 			{
 				$this->_execute($row, $rules, $val, $cycles);
 				$cycles++;
 			}
-			
+
 			return;
 		}
-		
+
 		// --------------------------------------------------------------------
 
 		// If the field is blank, but NOT required, no further tests are necessary
@@ -496,7 +496,7 @@
 		}
 
 		// --------------------------------------------------------------------
-		
+
 		// Isset Test. Typically this rule will only apply to checkboxes.
 		if (is_null($postdata) AND $callback == FALSE)
 		{
@@ -504,31 +504,31 @@
 			{
 				// Set the message type
 				$type = (in_array('required', $rules)) ? 'required' : 'isset';
-			
+
 				if ( ! isset($this->_error_messages[$type]))
 				{
 					if (FALSE === ($line = $this->CI->lang->line($type)))
 					{
 						$line = 'The field was not set';
-					}							
+					}
 				}
 				else
 				{
 					$line = $this->_error_messages[$type];
 				}
-				
+
 				// Build the error message
 				$message = sprintf($line, $this->_translate_fieldname($row['label']));
 
 				// Save the error message
 				$this->_field_data[$row['field']]['error'] = $message;
-				
+
 				if ( ! isset($this->_error_array[$row['field']]))
 				{
 					$this->_error_array[$row['field']] = $message;
 				}
 			}
-					
+
 			return;
 		}
 
@@ -538,7 +538,7 @@
 		foreach ($rules As $rule)
 		{
 			$_in_array = FALSE;
-			
+
 			// We set the $postdata variable with the current data in our master array so that
 			// each cycle of the loop is dealing with the processed data from the last cycle
 			if ($row['is_array'] == TRUE AND is_array($this->_field_data[$row['field']]['postdata']))
@@ -549,7 +549,7 @@
 				{
 					continue;
 				}
-			
+
 				$postdata = $this->_field_data[$row['field']]['postdata'][$cycles];
 				$_in_array = TRUE;
 			}
@@ -559,15 +559,15 @@
 			}
 
 			// --------------------------------------------------------------------
-	
-			// Is the rule a callback?			
+
+			// Is the rule a callback?
 			$callback = FALSE;
 			if (substr($rule, 0, 9) == 'callback_')
 			{
 				$rule = substr($rule, 9);
 				$callback = TRUE;
 			}
-			
+
 			// Strip the parameter (if exists) from the rule
 			// Rules can contain a parameter: max_length[5]
 			$param = FALSE;
@@ -576,15 +576,15 @@
 				$rule	= $match[1];
 				$param	= $match[2];
 			}
-			
+
 			// Call the function that corresponds to the rule
 			if ($callback === TRUE)
 			{
 				if ( ! method_exists($this->CI, $rule))
-				{ 		
+				{
 					continue;
 				}
-				
+
 				// Run the function and grab the result
 				$result = $this->CI->$rule($postdata, $param);
 
@@ -597,7 +597,7 @@
 				{
 					$this->_field_data[$row['field']]['postdata'] = (is_bool($result)) ? $postdata : $result;
 				}
-			
+
 				// If the field isn't required and we just processed a callback we'll move on...
 				if ( ! in_array('required', $rules, TRUE) AND $result !== FALSE)
 				{
@@ -605,15 +605,15 @@
 				}
 			}
 			else
-			{				
+			{
 				if ( ! method_exists($this, $rule))
 				{
-					// If our own wrapper function doesn't exist we see if a native PHP function does. 
+					// If our own wrapper function doesn't exist we see if a native PHP function does.
 					// Users can use any native PHP function call that has one param.
 					if (function_exists($rule))
 					{
 						$result = $rule($postdata);
-											
+
 						if ($_in_array == TRUE)
 						{
 							$this->_field_data[$row['field']]['postdata'][$cycles] = (is_bool($result)) ? $postdata : $result;
@@ -623,7 +623,7 @@
 							$this->_field_data[$row['field']]['postdata'] = (is_bool($result)) ? $postdata : $result;
 						}
 					}
-										
+
 					continue;
 				}
 
@@ -638,54 +638,54 @@
 					$this->_field_data[$row['field']]['postdata'] = (is_bool($result)) ? $postdata : $result;
 				}
 			}
-							
+
 			// Did the rule test negatively?  If so, grab the error.
 			if ($result === FALSE)
-			{			
+			{
 				if ( ! isset($this->_error_messages[$rule]))
 				{
 					if (FALSE === ($line = $this->CI->lang->line($rule)))
 					{
 						$line = 'Unable to access an error message corresponding to your field name.';
-					}						
+					}
 				}
 				else
 				{
 					$line = $this->_error_messages[$rule];
 				}
-				
+
 				// Is the parameter we are inserting into the error message the name
 				// of another field?  If so we need to grab its "field label"
 				if (isset($this->_field_data[$param]) AND isset($this->_field_data[$param]['label']))
 				{
 					$param = $this->_translate_fieldname($this->_field_data[$param]['label']);
 				}
-				
+
 				// Build the error message
 				$message = sprintf($line, $this->_translate_fieldname($row['label']), $param);
 
 				// Save the error message
 				$this->_field_data[$row['field']]['error'] = $message;
-				
+
 				if ( ! isset($this->_error_array[$row['field']]))
 				{
 					$this->_error_array[$row['field']] = $message;
 				}
-				
+
 				return;
 			}
 		}
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Translate a field name
 	 *
 	 * @access	private
 	 * @param	string	the field name
 	 * @return	string
-	 */	
+	 */
 	function _translate_fieldname($fieldname)
 	{
 		// Do we need to translate the field name?
@@ -693,8 +693,8 @@
 		if (substr($fieldname, 0, 5) == 'lang:')
 		{
 			// Grab the variable
-			$line = substr($fieldname, 5);			
-			
+			$line = substr($fieldname, 5);
+
 			// Were we able to translate the field name?  If not we use $line
 			if (FALSE === ($fieldname = $this->CI->lang->line($line)))
 			{
@@ -706,7 +706,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Get the value from a form
 	 *
@@ -717,19 +717,19 @@
 	 * @param	string	the field name
 	 * @param	string
 	 * @return	void
-	 */	
+	 */
 	function set_value($field = '', $default = '')
 	{
 		if ( ! isset($this->_field_data[$field]))
 		{
 			return $default;
 		}
-		
+
 		return $this->_field_data[$field]['postdata'];
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set Select
 	 *
@@ -740,9 +740,9 @@
 	 * @param	string
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function set_select($field = '', $value = '', $default = FALSE)
-	{		
+	{
 		if ( ! isset($this->_field_data[$field]) OR ! isset($this->_field_data[$field]['postdata']))
 		{
 			if ($default === TRUE AND count($this->_field_data) === 0)
@@ -751,9 +751,9 @@
 			}
 			return '';
 		}
-	
+
 		$field = $this->_field_data[$field]['postdata'];
-		
+
 		if (is_array($field))
 		{
 			if ( ! in_array($value, $field))
@@ -768,12 +768,12 @@
 				return '';
 			}
 		}
-			
+
 		return ' selected="selected"';
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set Radio
 	 *
@@ -784,7 +784,7 @@
 	 * @param	string
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function set_radio($field = '', $value = '', $default = FALSE)
 	{
 		if ( ! isset($this->_field_data[$field]) OR ! isset($this->_field_data[$field]['postdata']))
@@ -795,9 +795,9 @@
 			}
 			return '';
 		}
-	
+
 		$field = $this->_field_data[$field]['postdata'];
-		
+
 		if (is_array($field))
 		{
 			if ( ! in_array($value, $field))
@@ -812,12 +812,12 @@
 				return '';
 			}
 		}
-			
+
 		return ' checked="checked"';
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set Checkbox
 	 *
@@ -828,7 +828,7 @@
 	 * @param	string
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function set_checkbox($field = '', $value = '', $default = FALSE)
 	{
 		if ( ! isset($this->_field_data[$field]) OR ! isset($this->_field_data[$field]['postdata']))
@@ -839,9 +839,9 @@
 			}
 			return '';
 		}
-	
+
 		$field = $this->_field_data[$field]['postdata'];
-		
+
 		if (is_array($field))
 		{
 			if ( ! in_array($value, $field))
@@ -856,12 +856,12 @@
 				return '';
 			}
 		}
-			
+
 		return ' checked="checked"';
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Required
 	 *
@@ -880,9 +880,9 @@
 			return ( ! empty($str));
 		}
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Match one field to another
 	 *
@@ -895,16 +895,16 @@
 	{
 		if ( ! isset($_POST[$field]))
 		{
-			return FALSE;				
+			return FALSE;
 		}
-		
+
 		$field = $_POST[$field];
 
 		return ($str !== $field) ? FALSE : TRUE;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Minimum Length
 	 *
@@ -912,7 +912,7 @@
 	 * @param	string
 	 * @param	value
 	 * @return	bool
-	 */	
+	 */
 	function min_length($str, $val)
 	{
 		if (preg_match("/[^0-9]/", $val))
@@ -922,14 +922,14 @@
 
 		if (function_exists('mb_strlen'))
 		{
-			return (mb_strlen($str) < $val) ? FALSE : TRUE;		
+			return (mb_strlen($str) < $val) ? FALSE : TRUE;
 		}
-	
+
 		return (strlen($str) < $val) ? FALSE : TRUE;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Max Length
 	 *
@@ -937,7 +937,7 @@
 	 * @param	string
 	 * @param	value
 	 * @return	bool
-	 */	
+	 */
 	function max_length($str, $val)
 	{
 		if (preg_match("/[^0-9]/", $val))
@@ -947,14 +947,14 @@
 
 		if (function_exists('mb_strlen'))
 		{
-			return (mb_strlen($str) > $val) ? FALSE : TRUE;		
+			return (mb_strlen($str) > $val) ? FALSE : TRUE;
 		}
-	
+
 		return (strlen($str) > $val) ? FALSE : TRUE;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Exact Length
 	 *
@@ -962,7 +962,7 @@
 	 * @param	string
 	 * @param	value
 	 * @return	bool
-	 */	
+	 */
 	function exact_length($str, $val)
 	{
 		if (preg_match("/[^0-9]/", $val))
@@ -972,42 +972,42 @@
 
 		if (function_exists('mb_strlen'))
 		{
-			return (mb_strlen($str) != $val) ? FALSE : TRUE;		
+			return (mb_strlen($str) != $val) ? FALSE : TRUE;
 		}
-	
+
 		return (strlen($str) != $val) ? FALSE : TRUE;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Valid Email
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	bool
-	 */	
+	 */
 	function valid_email($str)
 	{
 		return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $str)) ? FALSE : TRUE;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Valid Emails
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	bool
-	 */	
+	 */
 	function valid_emails($str)
 	{
 		if (strpos($str, ',') === FALSE)
 		{
 			return $this->valid_email(trim($str));
 		}
-		
+
 		foreach(explode(',', $str) as $email)
 		{
 			if (trim($email) != '' && $this->valid_email(trim($email)) === FALSE)
@@ -1015,12 +1015,12 @@
 				return FALSE;
 			}
 		}
-		
+
 		return TRUE;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Validate IP Address
 	 *
@@ -1034,56 +1034,56 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Alpha
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	bool
-	 */		
+	 */
 	function alpha($str)
 	{
 		return ( ! preg_match("/^([a-z])+$/i", $str)) ? FALSE : TRUE;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Alpha-numeric
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	bool
-	 */	
+	 */
 	function alpha_numeric($str)
 	{
 		return ( ! preg_match("/^([a-z0-9])+$/i", $str)) ? FALSE : TRUE;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Alpha-numeric with underscores and dashes
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	bool
-	 */	
+	 */
 	function alpha_dash($str)
 	{
 		return ( ! preg_match("/^([-a-z0-9_-])+$/i", $str)) ? FALSE : TRUE;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Numeric
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	bool
-	 */	
+	 */
 	function numeric($str)
 	{
 		return (bool)preg_match( '/^[\-+]?[0-9]*\.?[0-9]+$/', $str);
@@ -1092,72 +1092,72 @@
 
 	// --------------------------------------------------------------------
 
-    /**
-     * Is Numeric
-     *
-     * @access    public
-     * @param    string
-     * @return    bool
-     */
-    function is_numeric($str)
-    {
-        return ( ! is_numeric($str)) ? FALSE : TRUE;
-    } 
+	/**
+	 * Is Numeric
+	 *
+	 * @access	public
+	 * @param	string
+	 * @return	bool
+	 */
+	function is_numeric($str)
+	{
+		return ( ! is_numeric($str)) ? FALSE : TRUE;
+	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Integer
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	bool
-	 */	
+	 */
 	function integer($str)
 	{
 		return (bool)preg_match( '/^[\-+]?[0-9]+$/', $str);
 	}
-	
-	// --------------------------------------------------------------------
-
-    /**
-     * Is a Natural number  (0,1,2,3, etc.)
-     *
-     * @access	public
-     * @param	string
-     * @return	bool
-     */
-    function is_natural($str)
-    {   
-   		return (bool)preg_match( '/^[0-9]+$/', $str);
-    }
 
 	// --------------------------------------------------------------------
 
-    /**
-     * Is a Natural number, but not a zero  (1,2,3, etc.)
-     *
-     * @access	public
-     * @param	string
-     * @return	bool
-     */
+	/**
+	 * Is a Natural number  (0,1,2,3, etc.)
+	 *
+	 * @access	public
+	 * @param	string
+	 * @return	bool
+	 */
+	function is_natural($str)
+	{
+		return (bool)preg_match( '/^[0-9]+$/', $str);
+	}
+
+	// --------------------------------------------------------------------
+
+	/**
+	 * Is a Natural number, but not a zero  (1,2,3, etc.)
+	 *
+	 * @access	public
+	 * @param	string
+	 * @return	bool
+	 */
 	function is_natural_no_zero($str)
-    {
-    	if ( ! preg_match( '/^[0-9]+$/', $str))
-    	{
-    		return FALSE;
-    	}
-    	
-    	if ($str == 0)
-    	{
-    		return FALSE;
-    	}
-    
-   		return TRUE;
-    }
-	
+	{
+		if ( ! preg_match( '/^[0-9]+$/', $str))
+		{
+			return FALSE;
+		}
+
+		if ($str == 0)
+		{
+			return FALSE;
+		}
+
+		return TRUE;
+	}
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Valid Base64
 	 *
@@ -1172,9 +1172,9 @@
 	{
 		return (bool) ! preg_match('/[^a-zA-Z0-9\/\+=]/', $str);
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Prep data for form
 	 *
@@ -1193,10 +1193,10 @@
 			{
 				$data[$key] = $this->prep_for_form($val);
 			}
-			
+
 			return $data;
 		}
-		
+
 		if ($this->_safe_form_data == FALSE OR $data === '')
 		{
 			return $data;
@@ -1204,54 +1204,54 @@
 
 		return str_replace(array("'", '"', '<', '>'), array("&#39;", "&quot;", '&lt;', '&gt;'), stripslashes($data));
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Prep URL
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function prep_url($str = '')
 	{
 		if ($str == 'http://' OR $str == '')
 		{
 			return '';
 		}
-		
+
 		if (substr($str, 0, 7) != 'http://' && substr($str, 0, 8) != 'https://')
 		{
 			$str = 'http://'.$str;
 		}
-		
+
 		return $str;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Strip Image Tags
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function strip_image_tags($str)
 	{
 		return $this->CI->input->strip_image_tags($str);
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * XSS Clean
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function xss_clean($str)
 	{
 		if ( ! isset($this->CI->security))
@@ -1261,16 +1261,16 @@
 
 		return $this->CI->security->xss_clean($str);
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Convert PHP tags to entities
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function encode_php_tags($str)
 	{
 		return str_replace(array('<?php', '<?PHP', '<?', '?>'),  array('&lt;?php', '&lt;?PHP', '&lt;?', '?&gt;'), $str);
diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php
index 07f4b1f..fa2d377 100644
--- a/system/libraries/Ftp.php
+++ b/system/libraries/Ftp.php
@@ -295,7 +295,7 @@
 		{
 			return FALSE;
 		}
-       
+
 		// Set the mode if not specified
 		if ($mode == 'auto')
 		{
@@ -303,9 +303,9 @@
 			$ext = $this->_getext($rempath);
 			$mode = $this->_settype($ext);
 		}
-               
+
 		$mode = ($mode == 'ascii') ? FTP_ASCII : FTP_BINARY;
-               
+
 		$result = @ftp_get($this->conn_id, $locpath, $rempath, $mode);
 
 		if ($result === FALSE)
@@ -314,11 +314,11 @@
 			{
 				$this->_error('ftp_unable_to_download');
 			}
-			return FALSE;          
+			return FALSE;
 		}
-               
+
 		return TRUE;
-    }
+	}
 
 	// --------------------------------------------------------------------
 
@@ -454,7 +454,7 @@
 	 * Set file permissions
 	 *
 	 * @access	public
-	 * @param	string 	the file path
+	 * @param	string	the file path
 	 * @param	string	the permissions
 	 * @return	bool
 	 */
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index 806d942..9922560 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -26,7 +26,7 @@
  */
 class CI_Image_lib {
 
-	var $image_library		= 'gd2';  	// Can be:  imagemagick, netpbm, gd, gd2
+	var $image_library		= 'gd2';	// Can be:  imagemagick, netpbm, gd, gd2
 	var $library_path		= '';
 	var $dynamic_output		= FALSE;	// Whether to send to browser or write to disk
 	var $source_image		= '';
@@ -36,7 +36,7 @@
 	var $quality			= '90';
 	var $create_thumb		= FALSE;
 	var $thumb_marker		= '_thumb';
-	var $maintain_ratio		= TRUE;  	// Whether to maintain aspect ratio when resizing or use hard values
+	var $maintain_ratio		= TRUE;		// Whether to maintain aspect ratio when resizing or use hard values
 	var $master_dim			= 'auto';	// auto, height, or width.  Determines what to use as the master dimension
 	var $rotation_angle		= '';
 	var $x_axis				= '';
@@ -54,11 +54,11 @@
 	var $wm_hor_alignment	= 'C';			// Horizontal alignment: L R C
 	var $wm_padding			= 0;			// Padding around text
 	var $wm_hor_offset		= 0;			// Lets you push text to the right
-	var $wm_vrt_offset		= 0;			 // Lets you push  text down
+	var $wm_vrt_offset		= 0;			// Lets you push  text down
 	var $wm_font_color		= '#ffffff';	// Text color
 	var $wm_shadow_color	= '';			// Dropshadow color
 	var $wm_shadow_distance	= 2;			// Dropshadow distance
-	var $wm_opacity			= 50; 			// Image opacity: 1 - 100  Only works with image
+	var $wm_opacity			= 50;			// Image opacity: 1 - 100  Only works with image
 
 	// Private Vars
 	var $source_folder		= '';
@@ -147,7 +147,7 @@
 		if ($this->source_image == '')
 		{
 			$this->set_error('imglib_source_image_required');
-			return FALSE;	   
+			return FALSE;	
 		}
 
 		/*
@@ -190,7 +190,7 @@
 		// Set the Image Properties
 		if ( ! $this->get_image_properties($this->source_folder.$this->source_image))
 		{
-			return FALSE;	   
+			return FALSE;	
 		}
 
 		/*
@@ -400,7 +400,7 @@
 		if ($this->rotation_angle == '' OR ! in_array($this->rotation_angle, $degs))
 		{
 			$this->set_error('imglib_rotation_angle_required');
-			return FALSE;	   
+			return FALSE;	
 		}
 
 		// Reassign the width and height
@@ -455,8 +455,8 @@
 		{
 			if ($this->orig_width == $this->width AND $this->orig_height == $this->height)
 			{
- 				if ($this->source_image != $this->new_image)
- 				{
+				if ($this->source_image != $this->new_image)
+				{
 					if (@copy($this->full_src_path, $this->full_dst_path))
 					{
 						@chmod($this->full_dst_path, FILE_WRITE_MODE);
@@ -494,14 +494,14 @@
 			return FALSE;
 		}
 
- 		//  Create The Image
+		//  Create The Image
 		//
 		//  old conditional which users report cause problems with shared GD libs who report themselves as "2.0 or greater"
 		//  it appears that this is no longer the issue that it was in 2004, so we've removed it, retaining it in the comment
 		//  below should that ever prove inaccurate.
 		//
 		//  if ($this->image_library == 'gd2' AND function_exists('imagecreatetruecolor') AND $v2_override == FALSE)
- 		if ($this->image_library == 'gd2' AND function_exists('imagecreatetruecolor'))
+		if ($this->image_library == 'gd2' AND function_exists('imagecreatetruecolor'))
 		{
 			$create	= 'imagecreatetruecolor';
 			$copy	= 'imagecopyresampled';
@@ -519,7 +519,7 @@
 			imagealphablending($dst_img, FALSE);
 			imagesavealpha($dst_img, TRUE);
 		}
-		
+
 		$copy($dst_img, $src_img, 0, 0, $this->x_axis, $this->y_axis, $this->width, $this->height, $this->orig_width, $this->orig_height);
 
 		//  Show the image
@@ -584,9 +584,9 @@
 		{
 			switch ($this->rotation_angle)
 			{
-				case 'hor' 	: $angle = '-flop';
+				case 'hor'	: $angle = '-flop';
 					break;
-				case 'vrt' 	: $angle = '-flip';
+				case 'vrt'	: $angle = '-flip';
 					break;
 				default		: $angle = '-rotate '.$this->rotation_angle;
 					break;
@@ -664,7 +664,7 @@
 					break;
 				case 180	:	$angle = 'r180';
 					break;
-				case 270 	:	$angle = 'r90';
+				case 270	:	$angle = 'r90';
 					break;
 				case 'vrt'	:	$angle = 'tb';
 					break;
@@ -889,7 +889,7 @@
 		$this->get_image_properties();
 
 		//  Fetch watermark image properties
-		$props 			= $this->get_image_properties($this->wm_overlay_path, TRUE);
+		$props			= $this->get_image_properties($this->wm_overlay_path, TRUE);
 		$wm_img_type	= $props['image_type'];
 		$wm_width		= $props['width'];
 		$wm_height		= $props['height'];
@@ -944,7 +944,7 @@
 		if ($wm_img_type == 3 AND function_exists('imagealphablending'))
 		{
 			@imagealphablending($src_img, TRUE);
-		} 
+		}
 
 		// Set RGB values for text and shadow
 		$rgba = imagecolorat($wm_img, $this->wm_x_transp, $this->wm_y_transp);
@@ -1266,7 +1266,7 @@
 
 		switch ($this->image_type)
 		{
-			case 1 		:	imagegif($resource);
+			case 1		:	imagegif($resource);
 				break;
 			case 2		:	imagejpeg($resource, '', $this->quality);
 				break;
@@ -1384,8 +1384,8 @@
 	 * new variable needs to be known
 	 *
 	 *	$props = array(
-	 *					'width' 		=> $width,
-	 *					'height' 		=> $height,
+	 *					'width'			=> $width,
+	 *					'height'		=> $height,
 	 *					'new_width'		=> 40,
 	 *					'new_height'	=> ''
 	 *				  );
@@ -1446,7 +1446,7 @@
 	{
 		$ext = strrchr($source_image, '.');
 		$name = ($ext === FALSE) ? $source_image : substr($source_image, 0, -strlen($ext));
-		
+
 		return array('ext' => $ext, 'name' => $name);
 	}
 
diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php
index efaaab4..b4f33e3 100644
--- a/system/libraries/Javascript.php
+++ b/system/libraries/Javascript.php
@@ -29,9 +29,9 @@
 	var $_javascript_location = 'js';
 
 	function CI_Javascript($params = array())
-	{		
+	{
 		$defaults = array('js_library_driver' => 'jquery', 'autoload' => TRUE);
-		
+
 		foreach ($defaults as $key => $val)
 		{
 			if (isset($params[$key]) && $params[$key] !== "")
@@ -39,7 +39,7 @@
 				$defaults[$key] = $params[$key];
 			}
 		}
-		
+
 		extract($defaults);
 
 		$this->CI =& get_instance();
@@ -48,13 +48,13 @@
 		$this->CI->load->library('javascript/'.$js_library_driver, array('autoload' => $autoload));
 		// make js to refer to current library
 		$this->js =& $this->CI->$js_library_driver;
-		
+
 		log_message('debug', "Javascript Class Initialized and loaded.  Driver used: $js_library_driver");
 	}
 
-	// --------------------------------------------------------------------	 
-	// Event Code
 	// --------------------------------------------------------------------	
+	// Event Code
+	// --------------------------------------------------------------------
 
 	/**
 	 * Blur
@@ -70,9 +70,9 @@
 	{
 		return $this->js->_blur($element, $js);
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Change
 	 *
@@ -87,9 +87,9 @@
 	{
 		return $this->js->_change($element, $js);
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Click
 	 *
@@ -107,7 +107,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Double Click
 	 *
@@ -124,7 +124,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Error
 	 *
@@ -141,7 +141,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Focus
 	 *
@@ -158,7 +158,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Hover
 	 *
@@ -168,7 +168,7 @@
 	 * @param	string	- element
 	 * @param	string	- Javascript code for mouse over
 	 * @param	string	- Javascript code for mouse out
- 	 * @return	string
+	 * @return	string
 	 */
 	function hover($element = 'this', $over, $out)
 	{
@@ -176,7 +176,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Keydown
 	 *
@@ -193,7 +193,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Keyup
 	 *
@@ -207,10 +207,10 @@
 	function keyup($element = 'this', $js = '')
 	{
 		return $this->js->_keyup($element, $js);
-	}	
+	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Load
 	 *
@@ -224,10 +224,10 @@
 	function load($element = 'this', $js = '')
 	{
 		return $this->js->_load($element, $js);
-	}	
-	
+	}
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Mousedown
 	 *
@@ -244,7 +244,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Mouse Out
 	 *
@@ -261,7 +261,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Mouse Over
 	 *
@@ -360,7 +360,7 @@
 	{
 		return $this->js->_scroll($element, $js);
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -378,9 +378,9 @@
 		return $this->js->_unload($element, $js);
 	}
 
-	// --------------------------------------------------------------------	 
-	// Effects
 	// --------------------------------------------------------------------	
+	// Effects
+	// --------------------------------------------------------------------
 
 
 	/**
@@ -391,14 +391,14 @@
 	 * @access	public
 	 * @param	string	- element
 	 * @param	string	- Class to add
- 	 * @return	string
+	 * @return	string
 	 */
 	function addClass($element = 'this', $class = '')
 	{
 		return $this->js->_addClass($element, $class);
 	}
 
-	// --------------------------------------------------------------------	
+	// --------------------------------------------------------------------
 
 	/**
 	 * Animate
@@ -409,7 +409,7 @@
 	 * @param	string	- element
 	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
 	 * @param	string	- Javascript callback function
- 	 * @return	string
+	 * @return	string
 	 */
 	function animate($element = 'this', $params = array(), $speed = '', $extra = '')
 	{
@@ -417,7 +417,7 @@
 	}
 
 	// --------------------------------------------------------------------
-		
+
 	/**
 	 * Fade In
 	 *
@@ -427,15 +427,15 @@
 	 * @param	string	- element
 	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
 	 * @param	string	- Javascript callback function
- 	 * @return	string
+	 * @return	string
 	 */
 	function fadeIn($element = 'this', $speed = '', $callback = '')
 	{
 		return $this->js->_fadeIn($element, $speed, $callback);
 	}
-		
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Fade Out
 	 *
@@ -445,14 +445,14 @@
 	 * @param	string	- element
 	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
 	 * @param	string	- Javascript callback function
- 	 * @return	string
+	 * @return	string
 	 */
 	function fadeOut($element = 'this', $speed = '', $callback = '')
 	{
 		return $this->js->_fadeOut($element, $speed, $callback);
 	}
 	// --------------------------------------------------------------------
-		
+
 	/**
 	 * Slide Up
 	 *
@@ -462,14 +462,14 @@
 	 * @param	string	- element
 	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
 	 * @param	string	- Javascript callback function
- 	 * @return	string
+	 * @return	string
 	 */
 	function slideUp($element = 'this', $speed = '', $callback = '')
 	{
 		return $this->js->_slideUp($element, $speed, $callback);
 
 	}
-		
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -480,15 +480,15 @@
 	 * @access	public
 	 * @param	string	- element
 	 * @param	string	- Class to add
- 	 * @return	string
+	 * @return	string
 	 */
 	function removeClass($element = 'this', $class = '')
 	{
 		return $this->js->_removeClass($element, $class);
 	}
 
-	// --------------------------------------------------------------------	
-	
+	// --------------------------------------------------------------------
+
 	/**
 	 * Slide Down
 	 *
@@ -498,7 +498,7 @@
 	 * @param	string	- element
 	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
 	 * @param	string	- Javascript callback function
- 	 * @return	string
+	 * @return	string
 	 */
 	function slideDown($element = 'this', $speed = '', $callback = '')
 	{
@@ -506,7 +506,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Slide Toggle
 	 *
@@ -516,14 +516,14 @@
 	 * @param	string	- element
 	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
 	 * @param	string	- Javascript callback function
- 	 * @return	string
+	 * @return	string
 	 */
 	function slideToggle($element = 'this', $speed = '', $callback = '')
 	{
 		return $this->js->_slideToggle($element, $speed, $callback);
 
 	}
-		
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -535,15 +535,15 @@
 	 * @param	string	- element
 	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
 	 * @param	string	- Javascript callback function
- 	 * @return	string
+	 * @return	string
 	 */
 	function hide($element = 'this', $speed = '', $callback = '')
 	{
 		return $this->js->_hide($element, $speed, $callback);
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Toggle
 	 *
@@ -551,16 +551,16 @@
 	 *
 	 * @access	public
 	 * @param	string	- element
- 	 * @return	string
+	 * @return	string
 	 */
 	function toggle($element = 'this')
 	{
 		return $this->js->_toggle($element);
 
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Toggle Class
 	 *
@@ -568,15 +568,15 @@
 	 *
 	 * @access	public
 	 * @param	string	- element
- 	 * @return	string
+	 * @return	string
 	 */
 	function toggleClass($element = 'this', $class='')
 	{
 		return $this->js->_toggleClass($element, $class);
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Show
 	 *
@@ -586,7 +586,7 @@
 	 * @param	string	- element
 	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
 	 * @param	string	- Javascript callback function
- 	 * @return	string
+	 * @return	string
 	 */
 	function show($element = 'this', $speed = '', $callback = '')
 	{
@@ -604,12 +604,12 @@
 	 * @access	public
 	 * @param	string	The element to attach the event to
 	 * @return	string
-	 */	
+	 */
 	function compile($view_var = 'script_foot', $script_tags = TRUE)
 	{
 		$this->js->_compile($view_var, $script_tags);
 	}
-	
+
 	/**
 	 * Clear Compile
 	 *
@@ -624,7 +624,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * External
 	 *
@@ -645,16 +645,16 @@
 			if ($this->CI->config->item('javascript_location') != '')
 			{
 				$this->_javascript_location = $this->CI->config->item('javascript_location');
-			}		
+			}
 		}
-		
+
 		if ($relative === TRUE OR strncmp($external_file, 'http://', 7) == 0 OR strncmp($external_file, 'https://', 8) == 0)
 		{
-			$str = $this->_open_script($external_file);		
+			$str = $this->_open_script($external_file);
 		}
 		elseif (strpos($this->_javascript_location, 'http://') !== FALSE)
 		{
-			$str = $this->_open_script($this->_javascript_location.$external_file);		
+			$str = $this->_open_script($this->_javascript_location.$external_file);
 		}
 		else
 		{
@@ -664,13 +664,13 @@
 		$str .= $this->_close_script();
 		return $str;
 	}
-  	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Inline
 	 *
-	 * Outputs a <script> tag 
+	 * Outputs a <script> tag
 	 *
 	 * @access	public
 	 * @param	string	The element to attach the event to
@@ -682,19 +682,19 @@
 		$str = $this->_open_script();
 		$str .= ($cdata) ? "\n// <![CDATA[\n{$script}\n// ]]>\n" : "\n{$script}\n";
 		$str .= $this->_close_script();
-		
+
 		return $str;
 	}
-	  	
-	// --------------------------------------------------------------------
 	
+	// --------------------------------------------------------------------
+
 	/**
 	 * Open Script
 	 *
-	 * Outputs an opening <script> 
+	 * Outputs an opening <script>
 	 *
 	 * @access	private
-	 * @param	string	
+	 * @param	string
 	 * @return	string
 	 */
 	function _open_script($src = '')
@@ -705,22 +705,22 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Close Script
 	 *
-	 * Outputs an closing </script> 
+	 * Outputs an closing </script>
 	 *
 	 * @access	private
-	 * @param	string	
+	 * @param	string
 	 * @return	string
 	 */
 	function _close_script($extra = "\n")
 	{
 		return "</script>$extra";
 	}
-	
-	
+
+
 	// --------------------------------------------------------------------
 	// --------------------------------------------------------------------
 	// AJAX-Y STUFF - still a testbed
@@ -736,15 +736,15 @@
 	 * @param	string	- element
 	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
 	 * @param	string	- Javascript callback function
- 	 * @return	string
+	 * @return	string
 	 */
 	function update($element = 'this', $speed = '', $callback = '')
 	{
 		return $this->js->_updater($element, $speed, $callback);
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Generate JSON
 	 *
@@ -780,7 +780,7 @@
 
 		$json = array();
 		$_is_assoc = TRUE;
-		
+
 		if ( ! is_array($json_result) AND empty($json_result))
 		{
 			show_error("Generate JSON Failed - Illegal key, value pair.");
@@ -805,11 +805,11 @@
 		$json = implode(',', $json);
 
 		return $_is_assoc ? "{".$json."}" : "[".$json."]";
-		
+
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Is associative array
 	 *
@@ -828,12 +828,12 @@
 				return TRUE;
 			}
 		}
-		
+
 		return FALSE;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Prep Args
 	 *
@@ -862,7 +862,7 @@
 			return $result;
 		}
 	}
-	
+
 	// --------------------------------------------------------------------
 }
 // END Javascript Class
diff --git a/system/libraries/Log.php b/system/libraries/Log.php
index 4e6b3bc..99ed126 100644
--- a/system/libraries/Log.php
+++ b/system/libraries/Log.php
@@ -40,27 +40,27 @@
 	function CI_Log()
 	{
 		$config =& get_config();
-		
+
 		$this->log_path = ($config['log_path'] != '') ? $config['log_path'] : BASEPATH.'logs/';
-		
+
 		if ( ! is_dir($this->log_path) OR ! is_really_writable($this->log_path))
 		{
 			$this->_enabled = FALSE;
 		}
-		
+
 		if (is_numeric($config['log_threshold']))
 		{
 			$this->_threshold = $config['log_threshold'];
 		}
-			
+
 		if ($config['log_date_format'] != '')
 		{
 			$this->_date_fmt = $config['log_date_format'];
 		}
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Write Log File
 	 *
@@ -71,42 +71,42 @@
 	 * @param	string	the error message
 	 * @param	bool	whether the error is a native PHP error
 	 * @return	bool
-	 */		
+	 */
 	function write_log($level = 'error', $msg, $php_error = FALSE)
-	{		
+	{
 		if ($this->_enabled === FALSE)
 		{
 			return FALSE;
 		}
-	
+
 		$level = strtoupper($level);
-		
+
 		if ( ! isset($this->_levels[$level]) OR ($this->_levels[$level] > $this->_threshold))
 		{
 			return FALSE;
 		}
-	
+
 		$filepath = $this->log_path.'log-'.date('Y-m-d').EXT;
 		$message  = '';
-		
+
 		if ( ! file_exists($filepath))
 		{
 			$message .= "<"."?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?".">\n\n";
 		}
-			
+
 		if ( ! $fp = @fopen($filepath, FOPEN_WRITE_CREATE))
 		{
 			return FALSE;
 		}
 
 		$message .= $level.' '.(($level == 'INFO') ? ' -' : '-').' '.date($this->_date_fmt). ' --> '.$msg."\n";
-		
-		flock($fp, LOCK_EX);	
+
+		flock($fp, LOCK_EX);
 		fwrite($fp, $message);
 		flock($fp, LOCK_UN);
 		fclose($fp);
-	
-		@chmod($filepath, FILE_WRITE_MODE); 		
+
+		@chmod($filepath, FILE_WRITE_MODE);
 		return TRUE;
 	}
 
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php
index 3a0632d..b3175f9 100644
--- a/system/libraries/Pagination.php
+++ b/system/libraries/Pagination.php
@@ -30,11 +30,11 @@
 	var $prefix				= ''; // A custom prefix added to the path.
 	var $suffix				= ''; // A custom suffix added to the path.
 
-	var $total_rows  		= ''; // Total number of items (database results)
-	var $per_page	 		= 10; // Max number of items you want shown per page
+	var $total_rows			= ''; // Total number of items (database results)
+	var $per_page			= 10; // Max number of items you want shown per page
 	var $num_links			=  2; // Number of "digit" links to show before/after the currently viewed page
-	var $cur_page	 		=  0; // The current page being viewed
-	var $first_link   		= '&lsaquo; First';
+	var $cur_page			=  0; // The current page being viewed
+	var $first_link			= '&lsaquo; First';
 	var $next_link			= '&gt;';
 	var $prev_link			= '&lt;';
 	var $last_link			= 'Last &rsaquo;';
@@ -190,7 +190,7 @@
 			$this->base_url = rtrim($this->base_url, '/') .'/';
 		}
 
-  		// And here we go...
+		// And here we go...
 		$output = '';
 
 		// Render the "First" link
@@ -204,17 +204,17 @@
 		if  ($this->prev_link !== FALSE AND $this->cur_page != 1)
 		{
 			$i = $uri_page_number - $this->per_page;
-								
+
 			if ($i == 0 && $this->first_url != '')
 			{
-				$output .= $this->prev_tag_open.'<a '.$this->anchor_class.'href="'.$this->first_url.'">'.$this->prev_link.'</a>'.$this->prev_tag_close;				
+				$output .= $this->prev_tag_open.'<a '.$this->anchor_class.'href="'.$this->first_url.'">'.$this->prev_link.'</a>'.$this->prev_tag_close;
 			}
 			else
 			{
 				$i = ($i == 0) ? '' : $this->prefix.$i.$this->suffix;
 				$output .= $this->prev_tag_open.'<a '.$this->anchor_class.'href="'.$this->base_url.$i.'">'.$this->prev_link.'</a>'.$this->prev_tag_close;
 			}
-		
+
 		}
 
 		// Render the pages
@@ -234,7 +234,7 @@
 					else
 					{
 						$n = ($i == 0) ? '' : $i;
-					
+
 						if ($n == '' && $this->first_url != '')
 						{
 							$output .= $this->num_tag_open.'<a '.$this->anchor_class.'href="'.$this->first_url.'">'.$loop.'</a>'.$this->num_tag_close;
@@ -242,7 +242,7 @@
 						else
 						{
 							$n = ($n == '') ? '' : $this->prefix.$n.$this->suffix;
-						
+
 							$output .= $this->num_tag_open.'<a '.$this->anchor_class.'href="'.$this->base_url.$n.'">'.$loop.'</a>'.$this->num_tag_close;
 						}
 					}
diff --git a/system/libraries/Parser.php b/system/libraries/Parser.php
index 41a438b..b969ce4 100644
--- a/system/libraries/Parser.php
+++ b/system/libraries/Parser.php
@@ -94,7 +94,7 @@
 		{
 			if (is_array($val))
 			{
-				$template = $this->_parse_pair($key, $val, $template);		
+				$template = $this->_parse_pair($key, $val, $template);
 			}
 			else
 			{
@@ -110,9 +110,9 @@
 
 		return $template;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 *  Set the left/right variable delimiters
 	 *
@@ -126,9 +126,9 @@
 		$this->l_delim = $l;
 		$this->r_delim = $r;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 *  Parse a single key/value
 	 *
@@ -142,9 +142,9 @@
 	{
 		return str_replace($this->l_delim.$key.$this->r_delim, $val, $string);
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 *  Parse a tag pair
 	 *
@@ -157,7 +157,7 @@
 	 * @return	string
 	 */
 	function _parse_pair($variable, $data, $string)
-	{	
+	{
 		if (FALSE === ($match = $this->_match_pair($string, $variable)))
 		{
 			return $string;
@@ -178,15 +178,15 @@
 					$temp = $this->_parse_pair($key, $val, $temp);
 				}
 			}
-			
+
 			$str .= $temp;
 		}
-		
+
 		return str_replace($match['0'], $str, $string);
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 *  Matches a variable pair
 	 *
@@ -201,7 +201,7 @@
 		{
 			return FALSE;
 		}
-		
+
 		return $match;
 	}
 
diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php
index db17997..796db2d 100644
--- a/system/libraries/Profiler.php
+++ b/system/libraries/Profiler.php
@@ -33,7 +33,7 @@
 class CI_Profiler {
 
 	var $CI;
- 	
+
 	var $_available_sections	= array(
 										'benchmarks',
 										'get',
@@ -46,11 +46,11 @@
 										'config'
 										);
 
- 	function CI_Profiler($config = array())
- 	{
- 		$this->CI =& get_instance();
- 		$this->CI->load->language('profiler');
-		
+	function CI_Profiler($config = array())
+	{
+		$this->CI =& get_instance();
+		$this->CI->load->language('profiler');
+
 		// default all sections to display
 		foreach ($this->_available_sections as $section)
 		{
@@ -59,10 +59,10 @@
 				$this->_compile_{$section} = TRUE;
 			}
 		}
-		
+
 		$this->set_sections($config);
- 	}
- 	
+	}
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -80,13 +80,13 @@
 		{
 			if (in_array($method, $this->_available_sections))
 			{
-				$this->_compile_{$method} = ($enable !== FALSE) ? TRUE : FALSE;				
+				$this->_compile_{$method} = ($enable !== FALSE) ? TRUE : FALSE;
 			}
 		}
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Auto Profiler
 	 *
@@ -98,45 +98,45 @@
 	 * @access	private
 	 * @return	array
 	 */
- 	function _compile_benchmarks()
- 	{
-  		$profile = array();
- 		foreach ($this->CI->benchmark->marker as $key => $val)
- 		{
- 			// We match the "end" marker so that the list ends
- 			// up in the order that it was defined
- 			if (preg_match("/(.+?)_end/i", $key, $match))
- 			{ 			
- 				if (isset($this->CI->benchmark->marker[$match[1].'_end']) AND isset($this->CI->benchmark->marker[$match[1].'_start']))
- 				{
- 					$profile[$match[1]] = $this->CI->benchmark->elapsed_time($match[1].'_start', $key);
- 				}
- 			}
- 		}
+	function _compile_benchmarks()
+	{
+		$profile = array();
+		foreach ($this->CI->benchmark->marker as $key => $val)
+		{
+			// We match the "end" marker so that the list ends
+			// up in the order that it was defined
+			if (preg_match("/(.+?)_end/i", $key, $match))
+			{
+				if (isset($this->CI->benchmark->marker[$match[1].'_end']) AND isset($this->CI->benchmark->marker[$match[1].'_start']))
+				{
+					$profile[$match[1]] = $this->CI->benchmark->elapsed_time($match[1].'_start', $key);
+				}
+			}
+		}
 
 		// Build a table containing the profile data.
 		// Note: At some point we should turn this into a template that can
 		// be modified.  We also might want to make this data available to be logged
-	
+
 		$output  = "\n\n";
 		$output .= '<fieldset style="border:1px solid #900;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">';
 		$output .= "\n";
 		$output .= '<legend style="color:#900;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_benchmarks').'&nbsp;&nbsp;</legend>';
-		$output .= "\n";			
+		$output .= "\n";
 		$output .= "\n\n<table cellpadding='4' cellspacing='1' border='0' width='100%'>\n";
-		
+
 		foreach ($profile as $key => $val)
 		{
 			$key = ucwords(str_replace(array('_', '-'), ' ', $key));
 			$output .= "<tr><td style='width:50%;color:#000;font-weight:bold;background-color:#ddd;'>".$key."&nbsp;&nbsp;</td><td style='width:50%;color:#900;font-weight:normal;background-color:#ddd;'>".$val."</td></tr>\n";
 		}
-		
+
 		$output .= "</table>\n";
 		$output .= "</fieldset>";
- 		
- 		return $output;
- 	}
- 	
+
+		return $output;
+	}
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -144,7 +144,7 @@
 	 *
 	 * @access	private
 	 * @return	string
-	 */	
+	 */
 	function _compile_queries()
 	{
 		$dbs = array();
@@ -157,22 +157,22 @@
 				$dbs[] = $CI_object;
 			}
 		}
-					
+
 		if (count($dbs) == 0)
 		{
 			$output  = "\n\n";
 			$output .= '<fieldset style="border:1px solid #0000FF;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">';
 			$output .= "\n";
 			$output .= '<legend style="color:#0000FF;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_queries').'&nbsp;&nbsp;</legend>';
-			$output .= "\n";		
+			$output .= "\n";
 			$output .= "\n\n<table cellpadding='4' cellspacing='1' border='0' style='width:100%'>\n";
 			$output .="<tr><td style='width:100%;color:#0000FF;font-weight:normal;background-color:#eee;'>".$this->CI->lang->line('profiler_no_db')."</td></tr>\n";
 			$output .= "</table>\n";
 			$output .= "</fieldset>";
-			
+
 			return $output;
 		}
-		
+
 		// Load the text helper so we can highlight the SQL
 		$this->CI->load->helper('text');
 
@@ -180,45 +180,45 @@
 		$highlight = array('SELECT', 'DISTINCT', 'FROM', 'WHERE', 'AND', 'LEFT&nbsp;JOIN', 'ORDER&nbsp;BY', 'GROUP&nbsp;BY', 'LIMIT', 'INSERT', 'INTO', 'VALUES', 'UPDATE', 'OR&nbsp;', 'HAVING', 'OFFSET', 'NOT&nbsp;IN', 'IN', 'LIKE', 'NOT&nbsp;LIKE', 'COUNT', 'MAX', 'MIN', 'ON', 'AS', 'AVG', 'SUM', '(', ')');
 
 		$output  = "\n\n";
-			
+
 		foreach ($dbs as $db)
 		{
 			$output .= '<fieldset style="border:1px solid #0000FF;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">';
 			$output .= "\n";
 			$output .= '<legend style="color:#0000FF;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_database').':&nbsp; '.$db->database.'&nbsp;&nbsp;&nbsp;'.$this->CI->lang->line('profiler_queries').': '.count($this->CI->db->queries).'&nbsp;&nbsp;&nbsp;</legend>';
-			$output .= "\n";		
+			$output .= "\n";
 			$output .= "\n\n<table cellpadding='4' cellspacing='1' border='0' style='width:100%;'>\n";
-		
+
 			if (count($db->queries) == 0)
 			{
 				$output .= "<tr><td style='width:100%;color:#0000FF;font-weight:normal;background-color:#eee;'>".$this->CI->lang->line('profiler_no_queries')."</td></tr>\n";
 			}
 			else
-			{				
+			{
 				foreach ($db->queries as $key => $val)
-				{					
+				{
 					$time = number_format($db->query_times[$key], 4);
 
 					$val = highlight_code($val, ENT_QUOTES);
-	
+
 					foreach ($highlight as $bold)
 					{
-						$val = str_replace($bold, '<strong>'.$bold.'</strong>', $val);	
+						$val = str_replace($bold, '<strong>'.$bold.'</strong>', $val);
 					}
-					
+
 					$output .= "<tr><td valign='top' style='width:1%;color:#900;font-weight:normal;background-color:#ddd;'>".$time."&nbsp;&nbsp;</td><td style='color:#000;font-weight:normal;background-color:#ddd;'>".$val."</td></tr>\n";
 				}
 			}
-			
+
 			$output .= "</table>\n";
 			$output .= "</fieldset>";
-			
+
 		}
-		
+
 		return $output;
 	}
 
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -226,15 +226,15 @@
 	 *
 	 * @access	private
 	 * @return	string
-	 */	
+	 */
 	function _compile_get()
-	{	
+	{
 		$output  = "\n\n";
 		$output .= '<fieldset style="border:1px solid #cd6e00;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">';
 		$output .= "\n";
 		$output .= '<legend style="color:#cd6e00;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_get_data').'&nbsp;&nbsp;</legend>';
 		$output .= "\n";
-				
+
 		if (count($_GET) == 0)
 		{
 			$output .= "<div style='color:#cd6e00;font-weight:normal;padding:4px 0 4px 0'>".$this->CI->lang->line('profiler_no_get')."</div>";
@@ -242,14 +242,14 @@
 		else
 		{
 			$output .= "\n\n<table cellpadding='4' cellspacing='1' border='0' width='100%'>\n";
-		
+
 			foreach ($_GET as $key => $val)
 			{
 				if ( ! is_numeric($key))
 				{
 					$key = "'".$key."'";
 				}
-			
+
 				$output .= "<tr><td width='50%' style='color:#000;background-color:#ddd;'>&#36;_GET[".$key."]&nbsp;&nbsp; </td><td width='50%' style='color:#cd6e00;font-weight:normal;background-color:#ddd;'>";
 				if (is_array($val))
 				{
@@ -261,30 +261,30 @@
 				}
 				$output .= "</td></tr>\n";
 			}
-			
+
 			$output .= "</table>\n";
 		}
 		$output .= "</fieldset>";
 
-		return $output;	
+		return $output;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Compile $_POST Data
 	 *
 	 * @access	private
 	 * @return	string
-	 */	
+	 */
 	function _compile_post()
-	{	
+	{
 		$output  = "\n\n";
 		$output .= '<fieldset style="border:1px solid #009900;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">';
 		$output .= "\n";
 		$output .= '<legend style="color:#009900;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_post_data').'&nbsp;&nbsp;</legend>';
 		$output .= "\n";
-				
+
 		if (count($_POST) == 0)
 		{
 			$output .= "<div style='color:#009900;font-weight:normal;padding:4px 0 4px 0'>".$this->CI->lang->line('profiler_no_post')."</div>";
@@ -292,14 +292,14 @@
 		else
 		{
 			$output .= "\n\n<table cellpadding='4' cellspacing='1' border='0' width='100%'>\n";
-		
+
 			foreach ($_POST as $key => $val)
 			{
 				if ( ! is_numeric($key))
 				{
 					$key = "'".$key."'";
 				}
-			
+
 				$output .= "<tr><td width='50%' style='color:#000;background-color:#ddd;'>&#36;_POST[".$key."]&nbsp;&nbsp; </td><td width='50%' style='color:#009900;font-weight:normal;background-color:#ddd;'>";
 				if (is_array($val))
 				{
@@ -311,70 +311,70 @@
 				}
 				$output .= "</td></tr>\n";
 			}
-			
+
 			$output .= "</table>\n";
 		}
 		$output .= "</fieldset>";
 
-		return $output;	
+		return $output;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Show query string
 	 *
 	 * @access	private
 	 * @return	string
-	 */	
+	 */
 	function _compile_uri_string()
-	{	
+	{
 		$output  = "\n\n";
 		$output .= '<fieldset style="border:1px solid #000;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">';
 		$output .= "\n";
 		$output .= '<legend style="color:#000;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_uri_string').'&nbsp;&nbsp;</legend>';
 		$output .= "\n";
-		
+
 		if ($this->CI->uri->uri_string == '')
 		{
 			$output .= "<div style='color:#000;font-weight:normal;padding:4px 0 4px 0'>".$this->CI->lang->line('profiler_no_uri')."</div>";
 		}
 		else
 		{
-			$output .= "<div style='color:#000;font-weight:normal;padding:4px 0 4px 0'>".$this->CI->uri->uri_string."</div>";				
+			$output .= "<div style='color:#000;font-weight:normal;padding:4px 0 4px 0'>".$this->CI->uri->uri_string."</div>";
 		}
-		
+
 		$output .= "</fieldset>";
 
-		return $output;	
+		return $output;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Show the controller and function that were called
 	 *
 	 * @access	private
 	 * @return	string
-	 */	
+	 */
 	function _compile_controller_info()
-	{	
+	{
 		$output  = "\n\n";
 		$output .= '<fieldset style="border:1px solid #995300;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">';
 		$output .= "\n";
 		$output .= '<legend style="color:#995300;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_controller_info').'&nbsp;&nbsp;</legend>';
 		$output .= "\n";
-		
-		$output .= "<div style='color:#995300;font-weight:normal;padding:4px 0 4px 0'>".$this->CI->router->fetch_class()."/".$this->CI->router->fetch_method()."</div>";				
 
-		
+		$output .= "<div style='color:#995300;font-weight:normal;padding:4px 0 4px 0'>".$this->CI->router->fetch_class()."/".$this->CI->router->fetch_method()."</div>";
+
+
 		$output .= "</fieldset>";
 
-		return $output;	
+		return $output;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Compile memory usage
 	 *
@@ -390,23 +390,23 @@
 		$output .= "\n";
 		$output .= '<legend style="color:#5a0099;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_memory_usage').'&nbsp;&nbsp;</legend>';
 		$output .= "\n";
-		
+
 		if (function_exists('memory_get_usage') && ($usage = memory_get_usage()) != '')
 		{
 			$output .= "<div style='color:#5a0099;font-weight:normal;padding:4px 0 4px 0'>".number_format($usage).' bytes</div>';
 		}
 		else
 		{
-			$output .= "<div style='color:#5a0099;font-weight:normal;padding:4px 0 4px 0'>".$this->CI->lang->line('profiler_no_memory_usage')."</div>";				
+			$output .= "<div style='color:#5a0099;font-weight:normal;padding:4px 0 4px 0'>".$this->CI->lang->line('profiler_no_memory_usage')."</div>";
 		}
-		
+
 		$output .= "</fieldset>";
 
 		return $output;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Compile header information
 	 *
@@ -463,7 +463,7 @@
 			{
 				$val = print_r($val, TRUE);
 			}
-			
+
 			$output .= "<tr><td valign='top' style='color:#900;background-color:#ddd;'>".$config."&nbsp;&nbsp;</td><td style='color:#000;background-color:#ddd;'>".htmlspecialchars($val)."</td></tr>\n";
 		}
 
@@ -474,18 +474,18 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Run the Profiler
 	 *
 	 * @access	private
 	 * @return	string
-	 */	
+	 */
 	function run()
 	{
 		$output = "<div id='codeigniter_profiler' style='clear:both;background-color:#fff;padding:10px;'>";
 		$fields_displayed = 0;
-		
+
 		foreach ($this->_available_sections as $section)
 		{
 			if ($this->_compile_{$section} !== FALSE)
@@ -500,7 +500,7 @@
 		{
 			$output .= '<p style="border:1px solid #5a0099;padding:10px;margin:20px 0;background-color:#eee">'.$this->CI->lang->line('profiler_no_profiles').'</p>';
 		}
-		
+
 		$output .= '</div>';
 
 		return $output;
diff --git a/system/libraries/Security.php b/system/libraries/Security.php
index 9a1590b..2db8ee9 100644
--- a/system/libraries/Security.php
+++ b/system/libraries/Security.php
@@ -25,12 +25,12 @@
  * @link		http://codeigniter.com/user_guide/libraries/sessions.html
  */
 class CI_Security {
-	var $xss_hash 			= '';
-	var $csrf_hash 			= '';
+	var $xss_hash			= '';
+	var $csrf_hash			= '';
 	var $csrf_expire		= 7200;  // Two hours (in seconds)
 	var $csrf_token_name	= 'ci_csrf_token';
 	var $csrf_cookie_name	= 'ci_csrf_token';
-	
+
 	/* never allowed, string replacement */
 	var $never_allowed_str = array(
 									'document.cookie'	=> '[removed]',
@@ -63,7 +63,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Verify Cross Site Request Forgery Protection
 	 *
@@ -92,7 +92,7 @@
 
 		// We kill this since we're done and we don't want to polute the _POST array
 		unset($_POST[$this->csrf_token_name]);
-		
+
 		// Nothing should last forever
 		unset($_COOKIE[$this->csrf_cookie_name]);
 		$this->_csrf_set_hash();
@@ -100,9 +100,9 @@
 
 		log_message('debug', "CSRF token verified ");
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set Cross Site Request Forgery Protection Cookie
 	 *
@@ -114,12 +114,12 @@
 		$expire = time() + $this->csrf_expire;
 
 		setcookie($this->csrf_cookie_name, $this->csrf_hash, $expire, config_item('cookie_path'), config_item('cookie_domain'), 0);
-		
-		log_message('debug', "CRSF cookie Set");		
+
+		log_message('debug', "CRSF cookie Set");
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set Cross Site Request Forgery Protection Cookie
 	 *
@@ -146,7 +146,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Show CSRF Error
 	 *
@@ -159,7 +159,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * XSS Clean
 	 *
@@ -198,7 +198,7 @@
 			{
 				$str[$key] = $this->xss_clean($str[$key]);
 			}
-	
+
 			return $str;
 		}
 
@@ -210,9 +210,9 @@
 		/*
 		 * Protect GET variables in URLs
 		 */
-		 
+		
 		 // 901119URL5918AMP18930PROTECT8198
-		 
+		
 		$str = preg_replace('|\&([a-z\_0-9\-]+)\=([a-z\_0-9\-]+)|i', $this->xss_hash()."\\1=\\2", $str);
 
 		/*
@@ -225,7 +225,7 @@
 		$str = preg_replace('#(&\#?[0-9a-z]{2,})([\x00-\x20])*;?#i', "\\1;\\2", $str);
 
 		/*
-		 * Validate UTF16 two byte encoding (x00) 
+		 * Validate UTF16 two byte encoding (x00)
 		 *
 		 * Just as above, adds a semicolon if missing.
 		 *
@@ -248,9 +248,9 @@
 		 *
 		 */
 		$str = rawurldecode($str);
-	
+
 		/*
-		 * Convert character entities to ASCII 
+		 * Convert character entities to ASCII
 		 *
 		 * This permits our tests below to work reliably.
 		 * We only convert entities that are within tags since
@@ -259,14 +259,14 @@
 		 */
 
 		$str = preg_replace_callback("/[a-z]+=([\'\"]).*?\\1/si", array($this, '_convert_attribute'), $str);
-	 
+	
 		$str = preg_replace_callback("/<\w+.*?(?=>|<|$)/si", array($this, '_decode_entity'), $str);
 
 		/*
 		 * Remove Invisible Characters Again!
 		 */
 		$str = remove_invisible_characters($str);
-		
+
 		/*
 		 * Convert all tabs to spaces
 		 *
@@ -276,29 +276,29 @@
 		 * so we use str_replace.
 		 *
 		 */
-		
+
 		if (strpos($str, "\t") !== FALSE)
 		{
 			$str = str_replace("\t", ' ', $str);
 		}
-		
+
 		/*
 		 * Capture converted string for later comparison
 		 */
 		$converted_string = $str;
-		
+
 		/*
 		 * Not Allowed Under Any Conditions
 		 */
-		
+
 		foreach ($this->never_allowed_str as $key => $val)
 		{
-			$str = str_replace($key, $val, $str);   
+			$str = str_replace($key, $val, $str);
 		}
-	
+
 		foreach ($this->never_allowed_regex as $key => $val)
 		{
-			$str = preg_replace("#".$key."#i", $val, $str);   
+			$str = preg_replace("#".$key."#i", $val, $str);
 		}
 
 		/*
@@ -321,7 +321,7 @@
 		{
 			$str = str_replace(array('<?', '?'.'>'),  array('&lt;?', '?&gt;'), $str);
 		}
-		
+
 		/*
 		 * Compact any exploded words
 		 *
@@ -333,7 +333,7 @@
 		foreach ($words as $word)
 		{
 			$temp = '';
-			
+
 			for ($i = 0, $wordlen = strlen($word); $i < $wordlen; $i++)
 			{
 				$temp .= substr($word, $i, 1)."\s*";
@@ -343,7 +343,7 @@
 			// That way valid stuff like "dealer to" does not become "dealerto"
 			$str = preg_replace_callback('#('.substr($temp, 0, -3).')(\W)#is', array($this, '_compact_exploded_words'), $str);
 		}
-		
+
 		/*
 		 * Remove disallowed Javascript in links or img tags
 		 * We used to do some version comparisons and use of stripos for PHP5, but it is dog slow compared
@@ -352,17 +352,17 @@
 		do
 		{
 			$original = $str;
-	
+
 			if (preg_match("/<a/i", $str))
 			{
 				$str = preg_replace_callback("#<a\s+([^>]*?)(>|$)#si", array($this, '_js_link_removal'), $str);
 			}
-	
+
 			if (preg_match("/<img/i", $str))
 			{
 				$str = preg_replace_callback("#<img\s+([^>]*?)(\s?/?>|$)#si", array($this, '_js_img_removal'), $str);
 			}
-	
+
 			if (preg_match("/script/i", $str) OR preg_match("/xss/i", $str))
 			{
 				$str = preg_replace("#<(/*)(script|xss)(.*?)\>#si", '[removed]', $str);
@@ -385,14 +385,14 @@
 		if ($is_image === TRUE)
 		{
 			/*
-			 * Adobe Photoshop puts XML metadata into JFIF images, including namespacing, 
+			 * Adobe Photoshop puts XML metadata into JFIF images, including namespacing,
 			 * so we have to allow this for images. -Paul
 			 */
 			unset($event_handlers[array_search('xmlns', $event_handlers)]);
 		}
 
 		$str = preg_replace("#<([^><]+?)(".implode('|', $event_handlers).")(\s*=\s*[^><]*)([><]*)#i", "<\\1\\4", $str);
-		
+
 		/*
 		 * Sanitize naughty HTML elements
 		 *
@@ -420,7 +420,7 @@
 		 *
 		 */
 		$str = preg_replace('#(alert|cmd|passthru|eval|exec|expression|system|fopen|fsockopen|file|file_get_contents|readfile|unlink)(\s*)\((.*?)\)#si', "\\1\\2&#40;\\3&#41;", $str);
-					
+
 		/*
 		 * Final clean up
 		 *
@@ -430,9 +430,9 @@
 		 */
 		foreach ($this->never_allowed_str as $key => $val)
 		{
-			$str = str_replace($key, $val, $str);   
+			$str = str_replace($key, $val, $str);
 		}
-	
+
 		foreach ($this->never_allowed_regex as $key => $val)
 		{
 			$str = preg_replace("#".$key."#i", $val, $str);
@@ -457,13 +457,13 @@
 				return FALSE;
 			}
 		}
-		
+
 		log_message('debug', "XSS Filtering completed");
 		return $str;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Random Hash for protecting URLs
 	 *
@@ -471,22 +471,22 @@
 	 * @return	string
 	 */
 	function xss_hash()
-	{	
+	{
 		if ($this->xss_hash == '')
 		{
 			if (phpversion() >= 4.2)
 				mt_srand();
 			else
 				mt_srand(hexdec(substr(md5(microtime()), -8)) & 0x7fffffff);
-			
+
 			$this->xss_hash = md5(time() + mt_rand(0, 1999999999));
 		}
-		
+
 		return $this->xss_hash;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Compact Exploded Words
 	 *
@@ -501,9 +501,9 @@
 	{
 		return preg_replace('/\s+/s', '', $matches[1]).$matches[2];
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Sanitize Naughty HTML
 	 *
@@ -517,15 +517,15 @@
 	{
 		// encode opening brace
 		$str = '&lt;'.$matches[1].$matches[2].$matches[3];
-		
+
 		// encode captured opening or closing brace to prevent recursive vectors
 		$str .= str_replace(array('>', '<'), array('&gt;', '&lt;'), $matches[4]);
-		
+
 		return $str;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * JS Link Removal
 	 *
@@ -543,7 +543,7 @@
 		$attributes = $this->_filter_attributes(str_replace(array('<', '>'), '', $match[1]));
 		return str_replace($match[1], preg_replace("#href=.*?(alert\(|alert&\#40;|javascript\:|charset\=|window\.|document\.|\.cookie|<script|<xss|base64\s*,)#si", "", $attributes), $match[0]);
 	}
-	
+
 	/**
 	 * JS Image Removal
 	 *
@@ -563,7 +563,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Attribute Conversion
 	 *
@@ -577,7 +577,7 @@
 	{
 		return str_replace(array('>', '<', '\\'), array('&gt;', '&lt;', '\\\\'), $match[0]);
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -644,35 +644,35 @@
 	function entity_decode($str, $charset='UTF-8')
 	{
 		if (stristr($str, '&') === FALSE) return $str;
-	
+
 		// The reason we are not using html_entity_decode() by itself is because
 		// while it is not technically correct to leave out the semicolon
 		// at the end of an entity most browsers will still interpret the entity
 		// correctly.  html_entity_decode() does not convert entities without
 		// semicolons, so we are left with our own little solution here. Bummer.
-	
+
 		if (function_exists('html_entity_decode') && (strtolower($charset) != 'utf-8' OR is_php('5.0.0')))
 		{
 			$str = html_entity_decode($str, ENT_COMPAT, $charset);
 			$str = preg_replace('~&#x(0*[0-9a-f]{2,5})~ei', 'chr(hexdec("\\1"))', $str);
 			return preg_replace('~&#([0-9]{2,4})~e', 'chr(\\1)', $str);
 		}
-	
+
 		// Numeric Entities
 		$str = preg_replace('~&#x(0*[0-9a-f]{2,5});{0,1}~ei', 'chr(hexdec("\\1"))', $str);
 		$str = preg_replace('~&#([0-9]{2,4});{0,1}~e', 'chr(\\1)', $str);
-	
+
 		// Literal Entities - Slightly slow so we do another check
 		if (stristr($str, '&') === FALSE)
 		{
 			$str = strtr($str, array_flip(get_html_translation_table(HTML_ENTITIES)));
 		}
-	
+
 		return $str;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Filename Security
 	 *
@@ -705,16 +705,16 @@
 						"%20",
 						"%22",
 						"%3c",		// <
-						"%253c", 	// <
-						"%3e", 		// >
-						"%0e", 		// >
-						"%28", 		// (
-						"%29", 		// )
-						"%2528", 	// (
-						"%26", 		// &
-						"%24", 		// $
-						"%3f", 		// ?
-						"%3b", 		// ;
+						"%253c",	// <
+						"%3e",		// >
+						"%0e",		// >
+						"%28",		// (
+						"%29",		// )
+						"%2528",	// (
+						"%26",		// &
+						"%24",		// $
+						"%3f",		// ?
+						"%3b",		// ;
 						"%3d"		// =
 					);
 
diff --git a/system/libraries/Session.php b/system/libraries/Session.php
index fc3ee05..342c301 100644
--- a/system/libraries/Session.php
+++ b/system/libraries/Session.php
@@ -39,7 +39,7 @@
 	var $cookie_domain				= '';
 	var $sess_time_to_update		= 300;
 	var $encryption_key				= '';
-	var $flashdata_key 				= 'flash';
+	var $flashdata_key				= 'flash';
 	var $time_reference				= 'time';
 	var $gc_probability				= 5;
 	var $userdata					= array();
@@ -96,7 +96,7 @@
 		{
 			$this->sess_expiration = (60*60*24*365*2);
 		}
-		 
+		
 		// Set the cookie name
 		$this->sess_cookie_name = $this->cookie_prefix.$this->sess_cookie_name;
 
@@ -112,10 +112,10 @@
 		}
 
 		// Delete 'old' flashdata (from last request)
-	   	$this->_flashdata_sweep();
+		$this->_flashdata_sweep();
 
 		// Mark all new flashdata as old (data will be deleted before next request)
-	   	$this->_flashdata_mark();
+		$this->_flashdata_mark();
 
 		// Delete expired sessions if necessary
 		$this->_sess_gc();
@@ -313,9 +313,9 @@
 		$sessid .= $this->CI->input->ip_address();
 
 		$this->userdata = array(
-							'session_id' 	=> md5(uniqid($sessid, TRUE)),
-							'ip_address' 	=> $this->CI->input->ip_address(),
-							'user_agent' 	=> substr($this->CI->input->user_agent(), 0, 50),
+							'session_id'	=> md5(uniqid($sessid, TRUE)),
+							'ip_address'	=> $this->CI->input->ip_address(),
+							'user_agent'	=> substr($this->CI->input->user_agent(), 0, 50),
 							'last_activity'	=> $this->now
 							);
 
@@ -656,9 +656,9 @@
 			// if encryption is not used, we provide an md5 hash to prevent userside tampering
 			$cookie_data = $cookie_data.md5($cookie_data.$this->encryption_key);
 		}
-		
+
 		$expire = ($this->sess_expire_on_close === TRUE) ? 0 : $this->sess_expiration + time();
-		
+
 		// Set the cookie
 		setcookie(
 					$this->sess_cookie_name,
@@ -690,7 +690,7 @@
 			{
 				if (is_string($val))
 				{
-					$data[$key] = str_replace('\\', '{{slash}}', $val);					
+					$data[$key] = str_replace('\\', '{{slash}}', $val);
 				}
 			}
 		}
@@ -698,7 +698,7 @@
 		{
 			if (is_string($data))
 			{
-				$data = str_replace('\\', '{{slash}}', $data);				
+				$data = str_replace('\\', '{{slash}}', $data);
 			}
 		}
 
@@ -727,7 +727,7 @@
 			{
 				if (is_string($val))
 				{
-					$data[$key] = str_replace('{{slash}}', '\\', $val);					
+					$data[$key] = str_replace('{{slash}}', '\\', $val);
 				}
 			}
 
diff --git a/system/libraries/Sha1.php b/system/libraries/Sha1.php
index f9611a8..ff7e720 100644
--- a/system/libraries/Sha1.php
+++ b/system/libraries/Sha1.php
@@ -55,7 +55,7 @@
 	 * @access	public
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function generate($str)
 	{
 		$n = ((strlen($str) + 8) >> 6) + 1;
@@ -117,7 +117,7 @@
 
 		return $this->_hex($a).$this->_hex($b).$this->_hex($c).$this->_hex($d).$this->_hex($e);
 	}
-  	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -126,7 +126,7 @@
 	 * @access	private
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function _hex($str)
 	{
 		$str = dechex($str);
@@ -138,7 +138,7 @@
 
 		return $str;
 	}
-  	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -146,7 +146,7 @@
 	 *
 	 * @access	private
 	 * @return	string
-	 */	
+	 */
 	function _ft($t, $b, $c, $d)
 	{
 		if ($t < 20)
@@ -166,7 +166,7 @@
 	 *
 	 * @access	private
 	 * @return	string
-	 */	
+	 */
 	function _kt($t)
 	{
 		if ($t < 20)
@@ -186,7 +186,7 @@
 			return -899497514;
 		}
 	}
-  	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -194,7 +194,7 @@
 	 *
 	 * @access	private
 	 * @return	string
-	 */	
+	 */
 	function _safe_add($x, $y)
 	{
 		$lsw = ($x & 0xFFFF) + ($y & 0xFFFF);
@@ -202,7 +202,7 @@
 
 		return ($msw << 16) | ($lsw & 0xFFFF);
 	}
-  	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -210,7 +210,7 @@
 	 *
 	 * @access	private
 	 * @return	integer
-	 */	
+	 */
 	function _rol($num, $cnt)
 	{
 		return ($num << $cnt) | $this->_zero_fill($num, 32 - $cnt);
@@ -223,7 +223,7 @@
 	 *
 	 * @access	private
 	 * @return	string
-	 */	
+	 */
 	function _zero_fill($a, $b)
 	{
 		$bin = decbin($a);
diff --git a/system/libraries/Table.php b/system/libraries/Table.php
index 1f920ea..2fc1b63 100644
--- a/system/libraries/Table.php
+++ b/system/libraries/Table.php
@@ -30,13 +30,13 @@
 
 	var $rows				= array();
 	var $heading			= array();
-	var $auto_heading		= TRUE;	
-	var $caption			= NULL;	
-	var $template 			= NULL;
+	var $auto_heading		= TRUE;
+	var $caption			= NULL;
+	var $template			= NULL;
 	var $newline			= "\n";
 	var $empty_cells		= "";
 	var	$function			= FALSE;
-	
+
 	function CI_Table()
 	{
 		log_message('debug', "Table Class Initialized");
@@ -57,7 +57,7 @@
 		{
 			return FALSE;
 		}
-	
+
 		$this->template = $template;
 	}
 
@@ -97,21 +97,21 @@
 		{
 			return FALSE;
 		}
-		
-		// Turn off the auto-heading feature since it's doubtful we 
+
+		// Turn off the auto-heading feature since it's doubtful we
 		// will want headings from a one-dimensional array
 		$this->auto_heading = FALSE;
-		
+
 		if ($col_limit == 0)
 		{
 			return $array;
 		}
-	
+
 		$new = array();
 		while(count($array) > 0)
-		{	
-			$temp = array_splice($array, 0, $col_limit);	
-			
+		{
+			$temp = array_splice($array, 0, $col_limit);
+
 			if (count($temp) < $col_limit)
 			{
 				for ($i = count($temp); $i < $col_limit; $i++)
@@ -119,10 +119,10 @@
 					$temp[] = '&nbsp;';
 				}
 			}
-			
+
 			$new[] = $temp;
 		}
-		
+
 		return $new;
 	}
 
@@ -141,7 +141,7 @@
 	{
 		$this->empty_cells = $value;
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -160,7 +160,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Prep Args
 	 *
@@ -188,9 +188,9 @@
 					}
 					else
 					{
-						$args[$key] = array('data' => $val);						
+						$args[$key] = array('data' => $val);
 					}
-				}				
+				}
 			}
 		}
 		else
@@ -203,12 +203,12 @@
 				}
 			}
 		}
-		
+
 		return $args;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Add a table caption
 	 *
@@ -219,7 +219,7 @@
 	function set_caption($caption)
 	{
 		$this->caption = $caption;
-	}	
+	}
 
 	// --------------------------------------------------------------------
 
@@ -246,23 +246,23 @@
 				$this->_set_from_array($table_data, $set_heading);
 			}
 		}
-	
+
 		// Is there anything to display?  No?  Smite them!
 		if (count($this->heading) == 0 AND count($this->rows) == 0)
 		{
 			return 'Undefined table data';
 		}
-	
+
 		// Compile and validate the template date
 		$this->_compile_template();
-	
+
 		// set a custom cell manipulation function to a locally scoped variable so its callable
 		$function = $this->function;
-			
+
 		// Build the table!
-		
+
 		$out = $this->template['table_open'];
-		$out .= $this->newline;		
+		$out .= $this->newline;
 
 		// Add any caption here
 		if ($this->caption)
@@ -283,16 +283,16 @@
 			foreach($this->heading as $heading)
 			{
 				$temp = $this->template['heading_cell_start'];
-										
+
 				foreach ($heading as $key => $val)
 				{
 					if ($key != 'data')
 					{
 						$temp = str_replace('<th', "<th $key='$val'", $temp);
-					}							
+					}
 				}
 
-				$out .= $temp;				
+				$out .= $temp;
 				$out .= isset($heading['data']) ? $heading['data'] : '';
 				$out .= $this->template['heading_cell_end'];
 			}
@@ -302,13 +302,13 @@
 			$out .= $this->template['thead_close'];
 			$out .= $this->newline;
 		}
-				
+
 		// Build the table rows
 		if (count($this->rows) > 0)
 		{
 			$out .= $this->template['tbody_open'];
 			$out .= $this->newline;
-			
+
 			$i = 1;
 			foreach($this->rows as $row)
 			{
@@ -316,25 +316,25 @@
 				{
 					break;
 				}
-			
+
 				// We use modulus to alternate the row colors
 				$name = (fmod($i++, 2)) ? '' : 'alt_';
-			
+
 				$out .= $this->template['row_'.$name.'start'];
-				$out .= $this->newline;		
-	
+				$out .= $this->newline;
+
 				foreach($row as $cell)
 				{
 					$temp = $this->template['cell_'.$name.'start'];
-											
+
 					foreach ($cell as $key => $val)
 					{
 						if ($key != 'data')
 						{
 							$temp = str_replace('<td', "<td $key='$val'", $temp);
-						}							
+						}
 					}
-					
+
 					$cell = isset($cell['data']) ? $cell['data'] : '';
 					$out .= $temp;
 
@@ -353,23 +353,23 @@
 							$out .= $cell;
 						}
 					}
-					
+
 					$out .= $this->template['cell_'.$name.'end'];
 				}
-	
+
 				$out .= $this->template['row_'.$name.'end'];
-				$out .= $this->newline;	
+				$out .= $this->newline;
 			}
-			
+
 			$out .= $this->template['tbody_close'];
 			$out .= $this->newline;
 		}
 
 		$out .= $this->template['table_close'];
-	
+
 		return $out;
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -382,9 +382,9 @@
 	{
 		$this->rows				= array();
 		$this->heading			= array();
-		$this->auto_heading		= TRUE;	
+		$this->auto_heading		= TRUE;
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -400,7 +400,7 @@
 		{
 			return FALSE;
 		}
-		
+
 		// First generate the headings from the table column names
 		if (count($this->heading) == 0)
 		{
@@ -408,12 +408,12 @@
 			{
 				return FALSE;
 			}
-			
+
 			$this->heading = $this->_prep_args($query->list_fields());
 		}
-				
+
 		// Next blast through the result array and build out the rows
-		
+
 		if ($query->num_rows() > 0)
 		{
 			foreach ($query->result_array() as $row)
@@ -438,10 +438,10 @@
 		{
 			return FALSE;
 		}
-		
+
 		$i = 0;
 		foreach ($data as $row)
-		{					
+		{
 			// If a heading hasn't already been set we'll use the first row of the array as the heading
 			if ($i == 0 AND count($data) > 1 AND count($this->heading) == 0 AND $set_heading == TRUE)
 			{
@@ -451,7 +451,7 @@
 			{
 				$this->rows[] = $this->_prep_args($row);
 			}
-			
+
 			$i++;
 		}
 	}
@@ -464,14 +464,14 @@
 	 * @access	private
 	 * @return	void
 	 */
- 	function _compile_template()
- 	{ 	
- 		if ($this->template == NULL)
- 		{
- 			$this->template = $this->_default_template();
- 			return;
- 		}
-		
+	function _compile_template()
+	{
+		if ($this->template == NULL)
+		{
+			$this->template = $this->_default_template();
+			return;
+		}
+
 		$this->temp = $this->_default_template();
 		foreach (array('table_open', 'thead_open', 'thead_close', 'heading_row_start', 'heading_row_end', 'heading_cell_start', 'heading_cell_end', 'tbody_open', 'tbody_close', 'row_start', 'row_end', 'cell_start', 'cell_end', 'row_alt_start', 'row_alt_end', 'cell_alt_start', 'cell_alt_end', 'table_close') as $val)
 		{
@@ -479,9 +479,9 @@
 			{
 				$this->template[$val] = $this->temp[$val];
 			}
-		} 	
- 	}
-	
+		}
+	}
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -493,33 +493,33 @@
 	function _default_template()
 	{
 		return  array (
-						'table_open' 			=> '<table border="0" cellpadding="4" cellspacing="0">',
-						
+						'table_open'			=> '<table border="0" cellpadding="4" cellspacing="0">',
+
 						'thead_open'			=> '<thead>',
 						'thead_close'			=> '</thead>',
-						
-						'heading_row_start' 	=> '<tr>',
-						'heading_row_end' 		=> '</tr>',
+
+						'heading_row_start'		=> '<tr>',
+						'heading_row_end'		=> '</tr>',
 						'heading_cell_start'	=> '<th>',
 						'heading_cell_end'		=> '</th>',
 
 						'tbody_open'			=> '<tbody>',
 						'tbody_close'			=> '</tbody>',
-						
-						'row_start' 			=> '<tr>',
-						'row_end' 				=> '</tr>',
+
+						'row_start'				=> '<tr>',
+						'row_end'				=> '</tr>',
 						'cell_start'			=> '<td>',
 						'cell_end'				=> '</td>',
 
-						'row_alt_start' 		=> '<tr>',
-						'row_alt_end' 			=> '</tr>',
+						'row_alt_start'		=> '<tr>',
+						'row_alt_end'			=> '</tr>',
 						'cell_alt_start'		=> '<td>',
 						'cell_alt_end'			=> '</td>',
 
-						'table_close' 			=> '</table>'
-					);	
+						'table_close'			=> '</table>'
+					);
 	}
-	
+
 
 }
 
diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php
index a279144..a8be8a8 100644
--- a/system/libraries/Trackback.php
+++ b/system/libraries/Trackback.php
@@ -27,7 +27,7 @@
  * @link		http://codeigniter.com/user_guide/libraries/trackback.html
  */
 class CI_Trackback {
-		
+
 	var $time_format	= 'local';
 	var $charset		= 'UTF-8';
 	var $data			= array('url' => '', 'title' => '', 'excerpt' => '', 'blog_name' => '', 'charset' => '');
@@ -44,24 +44,24 @@
 	{
 		log_message('debug', "Trackback Class Initialized");
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Send Trackback
 	 *
 	 * @access	public
 	 * @param	array
 	 * @return	bool
-	 */	
+	 */
 	function send($tb_data)
-	{		
+	{
 		if ( ! is_array($tb_data))
 		{
 			$this->set_error('The send() method must be passed an array');
 			return FALSE;
 		}
-		
+
 		// Pre-process the Trackback Data
 		foreach (array('url', 'title', 'excerpt', 'blog_name', 'ping_url') as $item)
 		{
@@ -70,14 +70,14 @@
 				$this->set_error('Required item missing: '.$item);
 				return FALSE;
 			}
-			
+
 			switch ($item)
 			{
 				case 'ping_url'	: $$item = $this->extract_urls($tb_data[$item]);
 					break;
 				case 'excerpt'	: $$item = $this->limit_characters($this->convert_xml(strip_tags(stripslashes($tb_data[$item]))));
 					break;
-				case 'url'	 	: $$item = str_replace('&#45;', '-', $this->convert_xml(strip_tags(stripslashes($tb_data[$item]))));
+				case 'url'		: $$item = str_replace('&#45;', '-', $this->convert_xml(strip_tags(stripslashes($tb_data[$item]))));
 					break;
 				default			: $$item = $this->convert_xml(strip_tags(stripslashes($tb_data[$item])));
 					break;
@@ -103,9 +103,9 @@
 
 		// Build the Trackback data string
 		$charset = ( ! isset($tb_data['charset'])) ? $this->charset : $tb_data['charset'];
-		
+
 		$data = "url=".rawurlencode($url)."&title=".rawurlencode($title)."&blog_name=".rawurlencode($blog_name)."&excerpt=".rawurlencode($excerpt)."&charset=".rawurlencode($charset);
-				
+
 		// Send Trackback(s)
 		$return = TRUE;
 		if (count($ping_url) > 0)
@@ -116,14 +116,14 @@
 				{
 					$return = FALSE;
 				}
-			}	
+			}
 		}
 
 		return $return;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Receive Trackback  Data
 	 *
@@ -134,9 +134,9 @@
 	 *
 	 * @access	public
 	 * @return	bool
-	 */	
+	 */
 	function receive()
-	{  					
+	{
 		foreach (array('url', 'title', 'blog_name', 'excerpt') as $val)
 		{
 			if ( ! isset($_POST[$val]) OR $_POST[$val] == '')
@@ -144,29 +144,29 @@
 				$this->set_error('The following required POST variable is missing: '.$val);
 				return FALSE;
 			}
-			
+
 			$this->data['charset'] = ( ! isset($_POST['charset'])) ? 'auto' : strtoupper(trim($_POST['charset']));
-	
+
 			if ($val != 'url' && function_exists('mb_convert_encoding'))
 			{
 				$_POST[$val] = mb_convert_encoding($_POST[$val], $this->charset, $this->data['charset']);
 			}
-			
+
 			$_POST[$val] = ($val != 'url') ? $this->convert_xml(strip_tags($_POST[$val])) : strip_tags($_POST[$val]);
-			
+
 			if ($val == 'excerpt')
 			{
 				$_POST['excerpt'] = $this->limit_characters($_POST['excerpt']);
 			}
-			
+
 			$this->data[$val] = $_POST[$val];
 		}
 
 		return TRUE;
-	}	
-	
+	}
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Send Trackback Error Message
 	 *
@@ -177,15 +177,15 @@
 	 * @access	public
 	 * @param	string
 	 * @return	void
-	 */	
+	 */
 	function send_error($message = 'Incomplete Information')
 	{
 		echo "<?xml version=\"1.0\" encoding=\"utf-8\"?".">\n<response>\n<error>1</error>\n<message>".$message."</message>\n</response>";
 		exit;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Send Trackback Success Message
 	 *
@@ -194,29 +194,29 @@
 	 *
 	 * @access	public
 	 * @return	void
-	 */		
+	 */
 	function send_success()
 	{
 		echo "<?xml version=\"1.0\" encoding=\"utf-8\"?".">\n<response>\n<error>0</error>\n</response>";
 		exit;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Fetch a particular item
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function data($item)
 	{
 		return ( ! isset($this->data[$item])) ? '' : $this->data[$item];
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Process Trackback
 	 *
@@ -227,11 +227,11 @@
 	 * @param	string
 	 * @param	string
 	 * @return	bool
-	 */	
+	 */
 	function process($url, $data)
 	{
 		$target = parse_url($url);
-	
+
 		// Open the socket
 		if ( ! $fp = @fsockopen($target['host'], 80))
 		{
@@ -241,7 +241,7 @@
 
 		// Build the path
 		$ppath = ( ! isset($target['path'])) ? $url : $target['path'];
-		
+
 		$path = (isset($target['query']) && $target['query'] != "") ? $ppath.'?'.$target['query'] : $ppath;
 
 		// Add the Trackback ID to the data string
@@ -260,32 +260,32 @@
 
 		// Was it successful?
 		$this->response = "";
-		
+
 		while( ! feof($fp))
 		{
 			$this->response .= fgets($fp, 128);
 		}
 		@fclose($fp);
-		
-		
+
+
 		if (stristr($this->response, '<error>0</error>') === FALSE)
 		{
 			$message = 'An unknown error was encountered';
-			
+
 			if (preg_match("/<message>(.*?)<\/message>/is", $this->response, $match))
 			{
 				$message = trim($match['1']);
 			}
-			
+
 			$this->set_error($message);
 			return FALSE;
 		}
 
 		return TRUE;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Extract Trackback URLs
 	 *
@@ -296,34 +296,34 @@
 	 * @access	public
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function extract_urls($urls)
-	{		
+	{
 		// Remove the pesky white space and replace with a comma.
 		$urls = preg_replace("/\s*(\S+)\s*/", "\\1,", $urls);
-		
+
 		// If they use commas get rid of the doubles.
 		$urls = str_replace(",,", ",", $urls);
-		
+
 		// Remove any comma that might be at the end
 		if (substr($urls, -1) == ",")
 		{
 			$urls = substr($urls, 0, -1);
 		}
-				
+
 		// Break into an array via commas
 		$urls = preg_split('/[,]/', $urls);
-		
+
 		// Removes duplicates
 		$urls = array_unique($urls);
-		
+
 		array_walk($urls, array($this, 'validate_url'));
-		
+
 		return $urls;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Validate URL
 	 *
@@ -332,7 +332,7 @@
 	 * @access	public
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function validate_url($url)
 	{
 		$url = trim($url);
@@ -342,46 +342,46 @@
 			$url = "http://".$url;
 		}
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Find the Trackback URL's ID
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function get_id($url)
-	{	
+	{
 		$tb_id = "";
-		
+
 		if (strpos($url, '?') !== FALSE)
 		{
 			$tb_array = explode('/', $url);
 			$tb_end   = $tb_array[count($tb_array)-1];
-			
+
 			if ( ! is_numeric($tb_end))
 			{
 				$tb_end  = $tb_array[count($tb_array)-2];
 			}
-			
+
 			$tb_array = explode('=', $tb_end);
 			$tb_id	= $tb_array[count($tb_array)-1];
 		}
 		else
 		{
 			$url = rtrim($url, '/');
-				
+
 			$tb_array = explode('/', $url);
 			$tb_id	= $tb_array[count($tb_array)-1];
-			
+
 			if ( ! is_numeric($tb_id))
 			{
 				$tb_id  = $tb_array[count($tb_array)-2];
 			}
-		}	
-				
+		}
+
 		if ( ! preg_match ("/^([0-9]+)$/", $tb_id))
 		{
 			return FALSE;
@@ -389,11 +389,11 @@
 		else
 		{
 			return $tb_id;
-		}		
+		}
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Convert Reserved XML characters to Entities
 	 *
@@ -404,22 +404,22 @@
 	function convert_xml($str)
 	{
 		$temp = '__TEMP_AMPERSANDS__';
-		
+
 		$str = preg_replace("/&#(\d+);/", "$temp\\1;", $str);
 		$str = preg_replace("/&(\w+);/",  "$temp\\1;", $str);
-		
+
 		$str = str_replace(array("&","<",">","\"", "'", "-"),
-						   array("&amp;", "&lt;", "&gt;", "&quot;", "&#39;", "&#45;"),
-						   $str);
-			
+							array("&amp;", "&lt;", "&gt;", "&quot;", "&#39;", "&#45;"),
+							$str);
+
 		$str = preg_replace("/$temp(\d+);/","&#\\1;",$str);
 		$str = preg_replace("/$temp(\w+);/","&\\1;", $str);
-			
+
 		return $str;
-	}	
-	
+	}
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Character limiter
 	 *
@@ -437,27 +437,27 @@
 		{
 			return $str;
 		}
-			
+
 		$str = preg_replace("/\s+/", ' ', str_replace(array("\r\n", "\r", "\n"), ' ', $str));
-	
+
 		if (strlen($str) <= $n)
 		{
 			return $str;
 		}
-										
+
 		$out = "";
 		foreach (explode(' ', trim($str)) as $val)
 		{
-			$out .= $val.' ';			
+			$out .= $val.' ';
 			if (strlen($out) >= $n)
 			{
 				return trim($out).$end_char;
-			}		
+			}
 		}
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * High ASCII to Entities
 	 *
@@ -470,58 +470,58 @@
 	 */
 	function convert_ascii($str)
 	{
-	   $count	= 1;
-	   $out	= '';
-	   $temp	= array();
-		
-	   for ($i = 0, $s = strlen($str); $i < $s; $i++)
-	   {
-		   $ordinal = ord($str[$i]);
-		
-		   if ($ordinal < 128)
-		   {
-			   $out .= $str[$i];			
-		   }
-		   else
-		   {
-			   if (count($temp) == 0)
-			   {
-				   $count = ($ordinal < 224) ? 2 : 3;
-			   }
-			
-			   $temp[] = $ordinal;
-			
-			   if (count($temp) == $count)
-			   {
-				   $number = ($count == 3) ? (($temp['0'] % 16) * 4096) + (($temp['1'] % 64) * 64) + ($temp['2'] % 64) : (($temp['0'] % 32) * 64) + ($temp['1'] % 64);
-	
-				   $out .= '&#'.$number.';';
-				   $count = 1;
-				   $temp = array();
-			   }
-		   }
-	   }
-	
-	   return $out;
+		$count	= 1;
+		$out	= '';
+		$temp	= array();
+
+		for ($i = 0, $s = strlen($str); $i < $s; $i++)
+		{
+			$ordinal = ord($str[$i]);
+
+			if ($ordinal < 128)
+			{
+				$out .= $str[$i];
+			}
+			else
+			{
+				if (count($temp) == 0)
+				{
+					$count = ($ordinal < 224) ? 2 : 3;
+				}
+
+				$temp[] = $ordinal;
+
+				if (count($temp) == $count)
+				{
+					$number = ($count == 3) ? (($temp['0'] % 16) * 4096) + (($temp['1'] % 64) * 64) + ($temp['2'] % 64) : (($temp['0'] % 32) * 64) + ($temp['1'] % 64);
+
+					$out .= '&#'.$number.';';
+					$count = 1;
+					$temp = array();
+				}
+			}
+		}
+
+		return $out;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set error message
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	void
-	 */	
+	 */
 	function set_error($msg)
 	{
 		log_message('error', $msg);
 		$this->error_msg[] = $msg;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Show error messages
 	 *
@@ -529,15 +529,15 @@
 	 * @param	string
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function display_errors($open = '<p>', $close = '</p>')
-	{	
+	{
 		$str = '';
 		foreach ($this->error_msg as $val)
 		{
 			$str .= $open.$val.$close;
 		}
-	
+
 		return $str;
 	}
 
diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php
index f058769..d8b295e 100644
--- a/system/libraries/Typography.php
+++ b/system/libraries/Typography.php
@@ -28,22 +28,22 @@
 
 	// Block level elements that should not be wrapped inside <p> tags
 	var $block_elements = 'address|blockquote|div|dl|fieldset|form|h\d|hr|noscript|object|ol|p|pre|script|table|ul';
-	
+
 	// Elements that should not have <p> and <br /> tags within them.
 	var $skip_elements	= 'p|pre|ol|ul|dl|object|table|h\d';
-	
+
 	// Tags we want the parser to completely ignore when splitting the string.
 	var $inline_elements = 'a|abbr|acronym|b|bdo|big|br|button|cite|code|del|dfn|em|i|img|ins|input|label|map|kbd|q|samp|select|small|span|strong|sub|sup|textarea|tt|var';
-	
+
 	// array of block level elements that require inner content to be within another block level element
 	var $inner_block_required = array('blockquote');
-	
+
 	// the last block element parsed
 	var $last_block_element = '';
-	
+
 	// whether or not to protect quotes within { curly braces }
 	var $protect_braced_quotes = FALSE;
-	
+
 	/**
 	 * Nothing to do here...
 	 *
@@ -56,11 +56,11 @@
 	 * Auto Typography
 	 *
 	 * This function converts text, making it typographically correct:
-	 * 	- Converts double spaces into paragraphs.
-	 * 	- Converts single line breaks into <br /> tags
-	 * 	- Converts single and double quotes into correctly facing curly quote entities.
-	 * 	- Converts three dots into ellipsis.
-	 * 	- Converts double dashes into em-dashes.
+	 *	- Converts double spaces into paragraphs.
+	 *	- Converts single line breaks into <br /> tags
+	 *	- Converts single and double quotes into correctly facing curly quote entities.
+	 *	- Converts three dots into ellipsis.
+	 *	- Converts double dashes into em-dashes.
 	 *  - Converts two spaces into entities
 	 *
 	 * @access	public
@@ -78,15 +78,15 @@
 		// Standardize Newlines to make matching easier
 		if (strpos($str, "\r") !== FALSE)
 		{
-			$str = str_replace(array("\r\n", "\r"), "\n", $str);			
+			$str = str_replace(array("\r\n", "\r"), "\n", $str);
 		}
-			
+
 		// Reduce line breaks.  If there are more than two consecutive linebreaks
 		// we'll compress them down to a maximum of two since there's no benefit to more.
 		if ($reduce_linebreaks === TRUE)
 		{
 			$str = preg_replace("/\n\n+/", "\n\n", $str);
-		}   
+		}
 
 		// HTML comment tags don't conform to patterns of normal tags, so pull them out separately, only if needed
 		$html_comments = array();
@@ -101,50 +101,50 @@
 				}
 			}
 		}
-		
+
 		// match and yank <pre> tags if they exist.  It's cheaper to do this separately since most content will
 		// not contain <pre> tags, and it keeps the PCRE patterns below simpler and faster
 		if (strpos($str, '<pre') !== FALSE)
 		{
 			$str = preg_replace_callback("#<pre.*?>.*?</pre>#si", array($this, '_protect_characters'), $str);
 		}
-		
+
 		// Convert quotes within tags to temporary markers.
 		$str = preg_replace_callback("#<.+?>#si", array($this, '_protect_characters'), $str);
 
 		// Do the same with braces if necessary
 		if ($this->protect_braced_quotes === TRUE)
 		{
-			$str = preg_replace_callback("#\{.+?\}#si", array($this, '_protect_characters'), $str);		
+			$str = preg_replace_callback("#\{.+?\}#si", array($this, '_protect_characters'), $str);
 		}
-				
-		// Convert "ignore" tags to temporary marker.  The parser splits out the string at every tag 
-		// it encounters.  Certain inline tags, like image tags, links, span tags, etc. will be 
+
+		// Convert "ignore" tags to temporary marker.  The parser splits out the string at every tag
+		// it encounters.  Certain inline tags, like image tags, links, span tags, etc. will be
 		// adversely affected if they are split out so we'll convert the opening bracket < temporarily to: {@TAG}
 		$str = preg_replace("#<(/*)(".$this->inline_elements.")([ >])#i", "{@TAG}\\1\\2\\3", $str);
 
 		// Split the string at every tag.  This expression creates an array with this prototype:
-		// 
-		// 	[array]
-		// 	{
-		// 		[0] = <opening tag>
-		// 		[1] = Content...
-		// 		[2] = <closing tag>
-		// 		Etc...
-		// 	}	
+		//
+		//	[array]
+		//	{
+		//		[0] = <opening tag>
+		//		[1] = Content...
+		//		[2] = <closing tag>
+		//		Etc...
+		//	}
 		$chunks = preg_split('/(<(?:[^<>]+(?:"[^"]*"|\'[^\']*\')?)+>)/', $str, -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY);
-		
-		// Build our finalized string.  We cycle through the array, skipping tags, and processing the contained text	
+
+		// Build our finalized string.  We cycle through the array, skipping tags, and processing the contained text
 		$str = '';
 		$process = TRUE;
 		$paragraph = FALSE;
 		$current_chunk = 0;
 		$total_chunks = count($chunks);
-		
+
 		foreach ($chunks as $chunk)
-		{ 
+		{
 			$current_chunk++;
-			
+
 			// Are we dealing with a tag? If so, we'll skip the processing for this cycle.
 			// Well also set the "process" flag which allows us to skip <pre> tags and a few other things.
 			if (preg_match("#<(/*)(".$this->block_elements.").*?>#", $chunk, $match))
@@ -153,7 +153,7 @@
 				{
 					$process =  ($match[1] == '/') ? TRUE : FALSE;
 				}
-				
+
 				if ($match[1] == '')
 				{
 					$this->last_block_element = $match[2];
@@ -162,32 +162,32 @@
 				$str .= $chunk;
 				continue;
 			}
-			
+
 			if ($process == FALSE)
 			{
 				$str .= $chunk;
 				continue;
 			}
-			
+
 			//  Force a newline to make sure end tags get processed by _format_newlines()
 			if ($current_chunk == $total_chunks)
 			{
-				$chunk .= "\n";  
+				$chunk .= "\n";
 			}
-			
+
 			//  Convert Newlines into <p> and <br /> tags
 			$str .= $this->_format_newlines($chunk);
 		}
-		
+
 		// No opening block level tag?  Add it if needed.
 		if ( ! preg_match("/^\s*<(?:".$this->block_elements.")/i", $str))
 		{
 			$str = preg_replace("/^(.*?)<(".$this->block_elements.")/i", '<p>$1</p><$2', $str);
 		}
-		
+
 		// Convert quotes, elipsis, em-dashes, non-breaking spaces, and ampersands
 		$str = $this->format_characters($str);
-		
+
 		// restore HTML comments
 		for ($i = 0, $total = count($html_comments); $i < $total; $i++)
 		{
@@ -196,18 +196,18 @@
 			// if '<p>{@HC1}' then replace <p>{@HC1}</p> with the comment, else replace only {@HC1} with the comment
 			$str = preg_replace('#(?(?=<p>\{@HC'.$i.'\})<p>\{@HC'.$i.'\}(\s*</p>)|\{@HC'.$i.'\})#s', $html_comments[$i], $str);
 		}
-				
+
 		// Final clean up
 		$table = array(
-		
+
 						// If the user submitted their own paragraph tags within the text
 						// we will retain them instead of using our tags.
 						'/(<p[^>*?]>)<p>/'	=> '$1', // <?php BBEdit syntax coloring bug fix
-						
+
 						// Reduce multiple instances of opening/closing paragraph tags to a single one
 						'#(</p>)+#'			=> '</p>',
 						'/(<p>\W*<p>)+/'	=> '<p>',
-						
+
 						// Clean up stray paragraph tags that appear before block level elements
 						'#<p></p><('.$this->block_elements.')#'	=> '<$1',
 
@@ -223,15 +223,15 @@
 
 						// An unintended consequence of the _format_newlines function is that
 						// some of the newlines get truncated, resulting in <p> tags
-						// starting immediately after <block> tags on the same line. 
+						// starting immediately after <block> tags on the same line.
 						// This forces a newline after such occurrences, which looks much nicer.
 						"/><p>\n/"			=> ">\n<p>",
-						
+
 						// Similarly, there might be cases where a closing </block> will follow
 						// a closing </p> tag, so we'll correct it by adding a newline in between
 						"#</p></#"			=> "</p>\n</"
 						);
-		
+
 		// Do we need to reduce empty lines?
 		if ($reduce_linebreaks === TRUE)
 		{
@@ -243,13 +243,13 @@
 			// otherwise most browsers won't treat them as true paragraphs
 			$table['#<p></p>#'] = '<p>&nbsp;</p>';
 		}
-		
+
 		return preg_replace(array_keys($table), $table, $str);
 
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Format Characters
 	 *
@@ -264,10 +264,10 @@
 	function format_characters($str)
 	{
 		static $table;
-		
+
 		if ( ! isset($table))
 		{
-			$table = array(					
+			$table = array(
 							// nested smart quotes, opening and closing
 							// note that rules for grammar (English) allow only for two levels deep
 							// and that single quotes are _supposed_ to always be on the outside
@@ -313,7 +313,7 @@
 
 		return preg_replace(array_keys($table), $table, $str);
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -324,25 +324,25 @@
 	 * @access	public
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function _format_newlines($str)
 	{
 		if ($str == '')
 		{
 			return $str;
 		}
-		
+
 		if (strpos($str, "\n") === FALSE  && ! in_array($this->last_block_element, $this->inner_block_required))
 		{
 			return $str;
 		}
-		
+
 		// Convert two consecutive newlines to paragraphs
 		$str = str_replace("\n\n", "</p>\n\n<p>", $str);
-		
+
 		// Convert single spaces to <br /> tags
 		$str = preg_replace("/([^\n])(\n)([^\n])/", "\\1<br />\\2\\3", $str);
-		
+
 		// Wrap the whole enchilada in enclosing paragraphs
 		if ($str != "\n")
 		{
@@ -355,19 +355,19 @@
 		// Remove empty paragraphs if they are on the first line, as this
 		// is a potential unintended consequence of the previous code
 		$str = preg_replace("/<p><\/p>(.*)/", "\\1", $str, 1);
-		
+
 		return $str;
 	}
-	
+
 	// ------------------------------------------------------------------------
-	
+
 	/**
 	 * Protect Characters
 	 *
 	 * Protects special characters from being formatted later
 	 * We don't want quotes converted within tags so we'll temporarily convert them to {@DQ} and {@SQ}
- 	 * and we don't want double dashes converted to emdash entities, so they are marked with {@DD}
- 	 * likewise double spaces are converted to {@NBS} to prevent entity conversion
+	 * and we don't want double dashes converted to emdash entities, so they are marked with {@DD}
+	 * likewise double spaces are converted to {@NBS} to prevent entity conversion
 	 *
 	 * @access	public
 	 * @param	array
@@ -379,19 +379,19 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Convert newlines to HTML line breaks except within PRE tags
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	string
-	 */		
+	 */
 	function nl2br_except_pre($str)
 	{
 		$ex = explode("pre>",$str);
 		$ct = count($ex);
-	
+
 		$newstr = "";
 		for ($i = 0; $i < $ct; $i++)
 		{
@@ -403,14 +403,14 @@
 			{
 				$newstr .= $ex[$i];
 			}
-		
+
 			if ($ct - 1 != $i)
 				$newstr .= "pre>";
 		}
-	
+
 		return $newstr;
 	}
-	
+
 }
 // END Typography Class
 
diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php
index c471436..9a90cb4 100644
--- a/system/libraries/Unit_test.php
+++ b/system/libraries/Unit_test.php
@@ -29,9 +29,9 @@
 class CI_Unit_test {
 
 	var $active					= TRUE;
-	var $results 				= array();
+	var $results				= array();
 	var $strict					= FALSE;
-	var $_template 				= NULL;
+	var $_template				= NULL;
 	var $_template_rows			= NULL;
 	var $_test_items_visible	= array();
 
@@ -82,32 +82,32 @@
 	 * @param	mixed
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function run($test, $expected = TRUE, $test_name = 'undefined', $notes = '')
 	{
 		if ($this->active == FALSE)
 		{
 			return FALSE;
 		}
-	
+
 		if (in_array($expected, array('is_object', 'is_string', 'is_bool', 'is_true', 'is_false', 'is_int', 'is_numeric', 'is_float', 'is_double', 'is_array', 'is_null'), TRUE))
 		{
 			$expected = str_replace('is_float', 'is_double', $expected);
-			$result = ($expected($test)) ? TRUE : FALSE;	
+			$result = ($expected($test)) ? TRUE : FALSE;
 			$extype = str_replace(array('true', 'false'), 'bool', str_replace('is_', '', $expected));
 		}
 		else
 		{
 			if ($this->strict == TRUE)
-				$result = ($test === $expected) ? TRUE : FALSE;	
+				$result = ($test === $expected) ? TRUE : FALSE;
 			else
-				$result = ($test == $expected) ? TRUE : FALSE;	
-			
+				$result = ($test == $expected) ? TRUE : FALSE;
+
 			$extype = gettype($expected);
 		}
-				
+
 		$back = $this->_backtrace();
-	
+
 		$report[] = array (
 							'test_name'			=> $test_name,
 							'test_datatype'		=> gettype($test),
@@ -124,7 +124,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Generate a report
 	 *
@@ -175,9 +175,9 @@
 
 		return $r;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Use strict comparison
 	 *
@@ -191,9 +191,9 @@
 	{
 		$this->strict = ($state == FALSE) ? FALSE : TRUE;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Make Unit testing active
 	 *
@@ -207,9 +207,9 @@
 	{
 		$this->active = ($state == FALSE) ? FALSE : TRUE;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Result Array
 	 *
@@ -219,15 +219,15 @@
 	 * @return	array
 	 */
 	function result($results = array())
-	{	
+	{
 		$CI =& get_instance();
 		$CI->load->language('unit_test');
-		
+
 		if (count($results) == 0)
 		{
 			$results = $this->results;
 		}
-		
+
 		$retval = array();
 		foreach ($results as $result)
 		{
@@ -246,8 +246,8 @@
 						if (FALSE !== ($line = $CI->lang->line(strtolower('ut_'.$v))))
 						{
 							$v = $line;
-						}				
-						$temp[$CI->lang->line('ut_'.$k)] = $v;					
+						}
+						$temp[$CI->lang->line('ut_'.$k)] = $v;
 					}
 				}
 				else
@@ -255,19 +255,19 @@
 					if (FALSE !== ($line = $CI->lang->line(strtolower('ut_'.$val))))
 					{
 						$val = $line;
-					}				
+					}
 					$temp[$CI->lang->line('ut_'.$key)] = $val;
 				}
 			}
-			
+
 			$retval[] = $temp;
 		}
-	
+
 		return $retval;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set the template
 	 *
@@ -276,14 +276,14 @@
 	 * @access	public
 	 * @param	string
 	 * @return	void
-	 */	
+	 */
 	function set_template($template)
 	{
 		$this->_template = $template;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Generate a backtrace
 	 *
@@ -297,17 +297,17 @@
 		if (function_exists('debug_backtrace'))
 		{
 			$back = debug_backtrace();
-			
+
 			$file = ( ! isset($back['1']['file'])) ? '' : $back['1']['file'];
 			$line = ( ! isset($back['1']['line'])) ? '' : $back['1']['line'];
-						
+
 			return array('file' => $file, 'line' => $line);
 		}
 		return array('file' => 'Unknown', 'line' => 'Unknown');
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Get Default Template
 	 *
@@ -315,17 +315,17 @@
 	 * @return	string
 	 */
 	function _default_template()
-	{	
+	{
 		$this->_template = "\n".'<table style="width:100%; font-size:small; margin:10px 0; border-collapse:collapse; border:1px solid #CCC;">';
 		$this->_template .= '{rows}';
 		$this->_template .= "\n".'</table>';
-		
+
 		$this->_template_rows = "\n\t".'<tr>';
 		$this->_template_rows .= "\n\t\t".'<th style="text-align: left; border-bottom:1px solid #CCC;">{item}</th>';
 		$this->_template_rows .= "\n\t\t".'<td style="border-bottom:1px solid #CCC;">{result}</td>';
-		$this->_template_rows .= "\n\t".'</tr>';	
+		$this->_template_rows .= "\n\t".'</tr>';
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -336,29 +336,29 @@
 	 * @access	private
 	 * @return	void
 	 */
- 	function _parse_template()
- 	{
- 		if ( ! is_null($this->_template_rows))
- 		{
- 			return;
- 		}
- 		
- 		if (is_null($this->_template))
- 		{
- 			$this->_default_template();
- 			return;
- 		}
- 		
+	function _parse_template()
+	{
+		if ( ! is_null($this->_template_rows))
+		{
+			return;
+		}
+
+		if (is_null($this->_template))
+		{
+			$this->_default_template();
+			return;
+		}
+
 		if ( ! preg_match("/\{rows\}(.*?)\{\/rows\}/si", $this->_template, $match))
 		{
- 			$this->_default_template();
- 			return;
+			$this->_default_template();
+			return;
 		}
 
 		$this->_template_rows = $match['1'];
-		$this->_template = str_replace($match['0'], '{rows}', $this->_template); 	
- 	}
- 	
+		$this->_template = str_replace($match['0'], '{rows}', $this->_template);
+	}
+
 }
 // END Unit_test Class
 
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index c18c178..c83d0ae 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -25,7 +25,7 @@
  * @link		http://codeigniter.com/user_guide/libraries/file_uploading.html
  */
 class CI_Upload {
-	
+
 	var $max_size				= 0;
 	var $max_width				= 0;
 	var $max_height				= 0;
@@ -51,9 +51,9 @@
 	var $xss_clean				= FALSE;
 	var $temp_prefix			= "temp_file_";
 	var $client_name			= '';
-	
+
 	var $_file_name_override	= ''; //@PHP4 (should be private)
-	
+
 	/**
 	 * Constructor
 	 *
@@ -65,19 +65,19 @@
 		{
 			$this->initialize($props);
 		}
-		
+
 		log_message('debug', "Upload Class Initialized");
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Initialize preferences
 	 *
 	 * @access	public
 	 * @param	array
 	 * @return	void
-	 */	
+	 */
 
 	function initialize($config = array())
 	{
@@ -107,9 +107,9 @@
 							'xss_clean'			=> FALSE,
 							'temp_prefix'		=> "temp_file_",
 							'client_name'		=> ''
-						);	
-	
-	
+						);
+
+
 		foreach ($defaults as $key => $val)
 		{
 			if (isset($config[$key]))
@@ -122,27 +122,27 @@
 				else
 				{
 					$this->$key = $config[$key];
-				}			
+				}
 			}
 			else
 			{
 				$this->$key = $val;
 			}
 		}
-		
+
 		// if a file_name was provided in the config, use it instead of the user input
 		// supplied file name for all uploads until initialized again
 		$this->_file_name_override = $this->file_name;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Perform the file upload
 	 *
 	 * @access	public
 	 * @return	bool
-	 */	
+	 */
 	function do_upload($field = 'userfile')
 	{
 		// Is $_FILES[$field] set? If not, no reason to continue.
@@ -151,7 +151,7 @@
 			$this->set_error('upload_no_file_selected');
 			return FALSE;
 		}
-		
+
 		// Is the upload path valid?
 		if ( ! $this->validate_upload_path())
 		{
@@ -173,10 +173,10 @@
 					$this->set_error('upload_file_exceeds_form_limit');
 					break;
 				case 3: // UPLOAD_ERR_PARTIAL
-				   $this->set_error('upload_file_partial');
+					$this->set_error('upload_file_partial');
 					break;
 				case 4: // UPLOAD_ERR_NO_FILE
-				   $this->set_error('upload_no_file_selected');
+					$this->set_error('upload_no_file_selected');
 					break;
 				case 6: // UPLOAD_ERR_NO_TMP_DIR
 					$this->set_error('upload_no_temp_directory');
@@ -196,14 +196,14 @@
 
 
 		// Set the uploaded data as class variables
-		$this->file_temp = $_FILES[$field]['tmp_name'];		
-		$this->file_size = $_FILES[$field]['size'];	
+		$this->file_temp = $_FILES[$field]['tmp_name'];
+		$this->file_size = $_FILES[$field]['size'];
 		$this->file_type = preg_replace("/^(.+?);.*$/", "\\1", $_FILES[$field]['type']);
 		$this->file_type = strtolower(trim(stripslashes($this->file_type), '"'));
 		$this->file_name = $this->_prep_filename($_FILES[$field]['name']);
 		$this->file_ext	 = $this->get_extension($this->file_name);
 		$this->client_name = $this->file_name;
-		
+
 		// Is the file type allowed to be uploaded?
 		if ( ! $this->is_allowed_filetype())
 		{
@@ -220,10 +220,10 @@
 			if ( ! $this->is_allowed_filetype(TRUE))
 			{
 				$this->set_error('upload_invalid_filetype');
-				return FALSE;				
+				return FALSE;
 			}
 		}
-		
+
 		// Convert the file size to kilobytes
 		if ($this->file_size > 0)
 		{
@@ -247,7 +247,7 @@
 
 		// Sanitize the file name for security
 		$this->file_name = $this->clean_file_name($this->file_name);
-		
+
 		// Truncate the file name if it's too long
 		if ($this->max_filename > 0)
 		{
@@ -271,7 +271,7 @@
 		if ($this->overwrite == FALSE)
 		{
 			$this->file_name = $this->set_filename($this->upload_path, $this->file_name);
-			
+
 			if ($this->file_name === FALSE)
 			{
 				return FALSE;
@@ -304,8 +304,8 @@
 		{
 			if ( ! @move_uploaded_file($this->file_temp, $this->upload_path.$this->file_name))
 			{
-				 $this->set_error('upload_destination_error');
-				 return FALSE;
+				$this->set_error('upload_destination_error');
+				return FALSE;
 			}
 		}
 
@@ -319,18 +319,18 @@
 
 		return TRUE;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Finalized Data Array
-	 *	
+	 *
 	 * Returns an associative array containing all of the information
 	 * related to the upload, allowing the developer easy access in one array.
 	 *
 	 * @access	public
 	 * @return	array
-	 */	
+	 */
 	function data()
 	{
 		return array (
@@ -350,24 +350,24 @@
 						'image_size_str'	=> $this->image_size_str,
 					);
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set Upload Path
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	void
-	 */	
+	 */
 	function set_upload_path($path)
 	{
 		// Make sure it has a trailing slash
 		$this->upload_path = rtrim($path, '/').'/';
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set the file name
 	 *
@@ -379,25 +379,25 @@
 	 * @param	string
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function set_filename($path, $filename)
 	{
 		if ($this->encrypt_name == TRUE)
-		{		
+		{
 			mt_srand();
-			$filename = md5(uniqid(mt_rand())).$this->file_ext;	
+			$filename = md5(uniqid(mt_rand())).$this->file_ext;
 		}
-	
+
 		if ( ! file_exists($path.$filename))
 		{
 			return $filename;
 		}
-	
+
 		$filename = str_replace($this->file_ext, '', $filename);
-		
+
 		$new_filename = '';
 		for ($i = 1; $i < 100; $i++)
-		{			
+		{
 			if ( ! file_exists($path.$filename.$i.$this->file_ext))
 			{
 				$new_filename = $filename.$i.$this->file_ext;
@@ -415,72 +415,72 @@
 			return $new_filename;
 		}
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set Maximum File Size
 	 *
 	 * @access	public
 	 * @param	integer
 	 * @return	void
-	 */	
+	 */
 	function set_max_filesize($n)
 	{
 		$this->max_size = ((int) $n < 0) ? 0: (int) $n;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set Maximum File Name Length
 	 *
 	 * @access	public
 	 * @param	integer
 	 * @return	void
-	 */	
+	 */
 	function set_max_filename($n)
 	{
 		$this->max_filename = ((int) $n < 0) ? 0: (int) $n;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set Maximum Image Width
 	 *
 	 * @access	public
 	 * @param	integer
 	 * @return	void
-	 */	
+	 */
 	function set_max_width($n)
 	{
 		$this->max_width = ((int) $n < 0) ? 0: (int) $n;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set Maximum Image Height
 	 *
 	 * @access	public
 	 * @param	integer
 	 * @return	void
-	 */	
+	 */
 	function set_max_height($n)
 	{
 		$this->max_height = ((int) $n < 0) ? 0: (int) $n;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set Allowed File Types
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	void
-	 */	
+	 */
 	function set_allowed_types($types)
 	{
 		if ( ! is_array($types) && $types == '*')
@@ -490,9 +490,9 @@
 		}
 		$this->allowed_types = explode('|', $types);
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set Image Properties
 	 *
@@ -501,7 +501,7 @@
 	 * @access	public
 	 * @param	string
 	 * @return	void
-	 */	
+	 */
 	function set_image_properties($path = '')
 	{
 		if ( ! $this->is_image())
@@ -512,7 +512,7 @@
 		if (function_exists('getimagesize'))
 		{
 			if (FALSE !== ($D = @getimagesize($path)))
-			{	
+			{
 				$types = array(1 => 'gif', 2 => 'jpeg', 3 => 'png');
 
 				$this->image_width		= $D['0'];
@@ -522,9 +522,9 @@
 			}
 		}
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set XSS Clean
 	 *
@@ -539,15 +539,15 @@
 	{
 		$this->xss_clean = ($flag == TRUE) ? TRUE : FALSE;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Validate the image
 	 *
 	 * @access	public
 	 * @return	bool
-	 */	
+	 */
 	function is_image()
 	{
 		// IE will sometimes return odd mime-types during upload, so here we just standardize all
@@ -555,12 +555,12 @@
 
 		$png_mimes  = array('image/x-png');
 		$jpeg_mimes = array('image/jpg', 'image/jpe', 'image/jpeg', 'image/pjpeg');
-		
+
 		if (in_array($this->file_type, $png_mimes))
 		{
 			$this->file_type = 'image/png';
 		}
-		
+
 		if (in_array($this->file_type, $jpeg_mimes))
 		{
 			$this->file_type = 'image/jpeg';
@@ -570,80 +570,80 @@
 							'image/gif',
 							'image/jpeg',
 							'image/png',
-						   );
+						);
 
 		return (in_array($this->file_type, $img_mimes, TRUE)) ? TRUE : FALSE;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Verify that the filetype is allowed
 	 *
 	 * @access	public
 	 * @return	bool
-	 */	
+	 */
 	function is_allowed_filetype($ignore_mime = FALSE)
 	{
 		if ($this->allowed_types == '*')
 		{
 			return TRUE;
 		}
-		
+
 		if (count($this->allowed_types) == 0 OR ! is_array($this->allowed_types))
 		{
 			$this->set_error('upload_no_file_types');
 			return FALSE;
 		}
-		
+
 		$ext = strtolower(ltrim($this->file_ext, '.'));
-		
+
 		if ( ! in_array($ext, $this->allowed_types))
 		{
 			return FALSE;
 		}
 
-		// Images get some additional checks		
+		// Images get some additional checks
 		$image_types = array('gif', 'jpg', 'jpeg', 'png', 'jpe');
-		
+
 		if (in_array($ext, $image_types))
 		{
 			if (getimagesize($this->file_temp) === FALSE)
 			{
 				return FALSE;
-			}			
+			}
 		}
-		
+
 		if ($ignore_mime === TRUE)
 		{
 			return TRUE;
 		}
-		
+
 		$mime = $this->mimes_types($ext);
-				
+
 		if (is_array($mime))
 		{
 			if (in_array($this->file_type, $mime, TRUE))
 			{
 				return TRUE;
-			}			
+			}
 		}
 		elseif ($mime == $this->file_type)
 		{
 				return TRUE;
 		}
-		
+
 		return FALSE;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Verify that the file is within the allowed size
 	 *
 	 * @access	public
 	 * @return	bool
-	 */	
+	 */
 	function is_allowed_filesize()
 	{
 		if ($this->max_size != 0  AND  $this->file_size > $this->max_size)
@@ -655,15 +655,15 @@
 			return TRUE;
 		}
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Verify that the image is within the allowed width/height
 	 *
 	 * @access	public
 	 * @return	bool
-	 */	
+	 */
 	function is_allowed_dimensions()
 	{
 		if ( ! $this->is_image())
@@ -690,9 +690,9 @@
 
 		return TRUE;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Validate Upload Path
 	 *
@@ -701,7 +701,7 @@
 	 *
 	 * @access	public
 	 * @return	bool
-	 */	
+	 */
 	function validate_upload_path()
 	{
 		if ($this->upload_path == '')
@@ -709,7 +709,7 @@
 			$this->set_error('upload_no_filepath');
 			return FALSE;
 		}
-		
+
 		if (function_exists('realpath') AND @realpath($this->upload_path) !== FALSE)
 		{
 			$this->upload_path = str_replace("\\", "/", realpath($this->upload_path));
@@ -730,31 +730,31 @@
 		$this->upload_path = preg_replace("/(.+?)\/*$/", "\\1/",  $this->upload_path);
 		return TRUE;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Extract the file extension
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function get_extension($filename)
 	{
 		$x = explode('.', $filename);
 		return '.'.end($x);
-	}	
-	
+	}
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Clean the file name for security
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	string
-	 */		
+	 */
 	function clean_file_name($filename)
 	{
 		$bad = array(
@@ -773,40 +773,40 @@
 						"%20",
 						"%22",
 						"%3c",		// <
-						"%253c", 	// <
-						"%3e", 		// >
-						"%0e", 		// >
-						"%28", 		// (
-						"%29", 		// )
-						"%2528", 	// (
-						"%26", 		// &
-						"%24", 		// $
-						"%3f", 		// ?
-						"%3b", 		// ;
+						"%253c",	// <
+						"%3e",		// >
+						"%0e",		// >
+						"%28",		// (
+						"%29",		// )
+						"%2528",	// (
+						"%26",		// &
+						"%24",		// $
+						"%3f",		// ?
+						"%3b",		// ;
 						"%3d"		// =
 					);
-					
+
 		$filename = str_replace($bad, '', $filename);
 
 		return stripslashes($filename);
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Limit the File Name Length
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	string
-	 */		
+	 */
 	function limit_filename_length($filename, $length)
 	{
 		if (strlen($filename) < $length)
 		{
 			return $filename;
 		}
-	
+
 		$ext = '';
 		if (strpos($filename, '.') !== FALSE)
 		{
@@ -814,12 +814,12 @@
 			$ext		= '.'.array_pop($parts);
 			$filename	= implode('.', $parts);
 		}
-	
+
 		return substr($filename, 0, ($length - strlen($ext))).$ext;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Runs the file through the XSS clean function
 	 *
@@ -829,26 +829,26 @@
 	 *
 	 * @access	public
 	 * @return	void
-	 */	
+	 */
 	function do_xss_clean()
-	{		
+	{
 		$file = $this->file_temp;
-		
+
 		if (filesize($file) == 0)
 		{
 			return FALSE;
 		}
-		
+
 		if (function_exists('memory_get_usage') && memory_get_usage() && ini_get('memory_limit') != '')
 		{
 			$current = ini_get('memory_limit') * 1024 * 1024;
-			
+
 			// There was a bug/behavioural change in PHP 5.2, where numbers over one million get output
 			// into scientific notation.  number_format() ensures this number is an integer
 			// http://bugs.php.net/bug.php?id=43053
-			
+
 			$new_memory = number_format(ceil(filesize($file) + $current), 0, '.', '');
-			
+
 			ini_set('memory_limit', $new_memory); // When an integer is used, the value is measured in bytes. - PHP.net
 		}
 
@@ -856,18 +856,18 @@
 		// IE can be fooled into mime-type detecting a malformed image as an html file, thus executing an XSS attack on anyone
 		// using IE who looks at the image.  It does this by inspecting the first 255 bytes of an image.  To get around this
 		// CI will itself look at the first 255 bytes of an image to determine its relative safety.  This can save a lot of
-		// processor power and time if it is actually a clean image, as it will be in nearly all instances _except_ an 
+		// processor power and time if it is actually a clean image, as it will be in nearly all instances _except_ an
 		// attempted XSS attack.
 
 		if (function_exists('getimagesize') && @getimagesize($file) !== FALSE)
 		{
-	        if (($file = @fopen($file, 'rb')) === FALSE) // "b" to force binary
-	        {
+			if (($file = @fopen($file, 'rb')) === FALSE) // "b" to force binary
+			{
 				return FALSE; // Couldn't open the file, return FALSE
-	        }
+			}
 
-	        $opening_bytes = fread($file, 256);
-	        fclose($file);
+			$opening_bytes = fread($file, 256);
+			fclose($file);
 
 			// These are known to throw IE into mime-type detection chaos
 			// <a, <body, <head, <html, <img, <plaintext, <pre, <script, <table, <title
@@ -885,37 +885,37 @@
 		}
 
 		$CI =& get_instance();
-		
+
 		if ( ! isset($CI->security))
 		{
 			$CI->load->library('security');
 		}
-		
+
 		return $CI->security->xss_clean($data, TRUE);
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set an error message
 	 *
 	 * @access	public
 	 * @param	string
 	 * @return	void
-	 */	
+	 */
 	function set_error($msg)
 	{
-		$CI =& get_instance();	
+		$CI =& get_instance();
 		$CI->lang->load('upload');
-		
+
 		if (is_array($msg))
 		{
 			foreach ($msg as $val)
 			{
-				$msg = ($CI->lang->line($val) == FALSE) ? $val : $CI->lang->line($val);				
+				$msg = ($CI->lang->line($val) == FALSE) ? $val : $CI->lang->line($val);
 				$this->error_msg[] = $msg;
 				log_message('error', $msg);
-			}		
+			}
 		}
 		else
 		{
@@ -924,9 +924,9 @@
 			log_message('error', $msg);
 		}
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Display the error message
 	 *
@@ -934,7 +934,7 @@
 	 * @param	string
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function display_errors($open = '<p>', $close = '</p>')
 	{
 		$str = '';
@@ -942,12 +942,12 @@
 		{
 			$str .= $open.$val.$close;
 		}
-	
+
 		return $str;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * List of Mime Types
 	 *
@@ -957,11 +957,11 @@
 	 * @access	public
 	 * @param	string
 	 * @return	string
-	 */	
+	 */
 	function mimes_types($mime)
 	{
 		global $mimes;
-	
+
 		if (count($this->mimes) == 0)
 		{
 			if (@require_once(APPPATH.'config/mimes'.EXT))
@@ -970,12 +970,12 @@
 				unset($mimes);
 			}
 		}
-	
+
 		return ( ! isset($this->mimes[$mime])) ? FALSE : $this->mimes[$mime];
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Prep Filename
 	 *
@@ -1010,7 +1010,7 @@
 		}
 
 		$filename .= '.'.$ext;
-		
+
 		return $filename;
 	}
 
diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php
index a7c7a76..00cbf69 100644
--- a/system/libraries/User_agent.php
+++ b/system/libraries/User_agent.php
@@ -29,25 +29,25 @@
 class CI_User_agent {
 
 	var $agent		= NULL;
-	
+
 	var $is_browser	= FALSE;
 	var $is_robot	= FALSE;
 	var $is_mobile	= FALSE;
 
 	var $languages	= array();
 	var $charsets	= array();
-	
+
 	var $platforms	= array();
 	var $browsers	= array();
 	var $mobiles	= array();
 	var $robots		= array();
-	
+
 	var $platform	= '';
 	var $browser	= '';
 	var $version	= '';
 	var $mobile		= '';
 	var $robot		= '';
-	
+
 	/**
 	 * Constructor
 	 *
@@ -55,14 +55,14 @@
 	 *
 	 * @access	public
 	 * @return	void
-	 */		
+	 */
 	function CI_User_agent()
 	{
 		if (isset($_SERVER['HTTP_USER_AGENT']))
 		{
 			$this->agent = trim($_SERVER['HTTP_USER_AGENT']);
 		}
-		
+
 		if ( ! is_null($this->agent))
 		{
 			if ($this->_load_agent_file())
@@ -70,27 +70,27 @@
 				$this->_compile_data();
 			}
 		}
-		
+
 		log_message('debug', "User Agent Class Initialized");
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Compile the User Agent Data
 	 *
 	 * @access	private
 	 * @return	bool
-	 */		
+	 */
 	function _load_agent_file()
 	{
 		if ( ! @include(APPPATH.'config/user_agents'.EXT))
 		{
 			return FALSE;
 		}
-		
+
 		$return = FALSE;
-		
+
 		if (isset($platforms))
 		{
 			$this->platforms = $platforms;
@@ -111,7 +111,7 @@
 			unset($mobiles);
 			$return = TRUE;
 		}
-		
+
 		if (isset($robots))
 		{
 			$this->robots = $robots;
@@ -121,36 +121,36 @@
 
 		return $return;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Compile the User Agent Data
 	 *
 	 * @access	private
 	 * @return	bool
-	 */		
+	 */
 	function _compile_data()
 	{
 		$this->_set_platform();
-	
+
 		foreach (array('_set_browser', '_set_robot', '_set_mobile') as $function)
 		{
 			if ($this->$function() === TRUE)
 			{
 				break;
 			}
-		}	
+		}
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set the Platform
 	 *
 	 * @access	private
 	 * @return	mixed
-	 */		
+	 */
 	function _set_platform()
 	{
 		if (is_array($this->platforms) AND count($this->platforms) > 0)
@@ -168,19 +168,19 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set the Browser
 	 *
 	 * @access	private
 	 * @return	bool
-	 */		
+	 */
 	function _set_browser()
 	{
 		if (is_array($this->browsers) AND count($this->browsers) > 0)
 		{
 			foreach ($this->browsers as $key => $val)
-			{		
+			{
 				if (preg_match("|".preg_quote($key).".*?([0-9\.]+)|i", $this->agent, $match))
 				{
 					$this->is_browser = TRUE;
@@ -193,19 +193,19 @@
 		}
 		return FALSE;
 	}
-			
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set the Robot
 	 *
 	 * @access	private
 	 * @return	bool
-	 */		
+	 */
 	function _set_robot()
 	{
 		if (is_array($this->robots) AND count($this->robots) > 0)
-		{		
+		{
 			foreach ($this->robots as $key => $val)
 			{
 				if (preg_match("|".preg_quote($key)."|i", $this->agent))
@@ -220,17 +220,17 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set the Mobile Device
 	 *
 	 * @access	private
 	 * @return	bool
-	 */		
+	 */
 	function _set_mobile()
 	{
 		if (is_array($this->mobiles) AND count($this->mobiles) > 0)
-		{		
+		{
 			foreach ($this->mobiles as $key => $val)
 			{
 				if (FALSE !== (strpos(strtolower($this->agent), $key)))
@@ -240,261 +240,261 @@
 					return TRUE;
 				}
 			}
-		}	
+		}
 		return FALSE;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set the accepted languages
 	 *
 	 * @access	private
 	 * @return	void
-	 */			
+	 */
 	function _set_languages()
 	{
 		if ((count($this->languages) == 0) AND isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) AND $_SERVER['HTTP_ACCEPT_LANGUAGE'] != '')
 		{
 			$languages = preg_replace('/(;q=[0-9\.]+)/i', '', strtolower(trim($_SERVER['HTTP_ACCEPT_LANGUAGE'])));
-			
+
 			$this->languages = explode(',', $languages);
 		}
-		
+
 		if (count($this->languages) == 0)
 		{
 			$this->languages = array('Undefined');
-		}	
+		}
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set the accepted character sets
 	 *
 	 * @access	private
 	 * @return	void
-	 */			
+	 */
 	function _set_charsets()
-	{	
+	{
 		if ((count($this->charsets) == 0) AND isset($_SERVER['HTTP_ACCEPT_CHARSET']) AND $_SERVER['HTTP_ACCEPT_CHARSET'] != '')
 		{
 			$charsets = preg_replace('/(;q=.+)/i', '', strtolower(trim($_SERVER['HTTP_ACCEPT_CHARSET'])));
-			
+
 			$this->charsets = explode(',', $charsets);
 		}
-		
+
 		if (count($this->charsets) == 0)
 		{
 			$this->charsets = array('Undefined');
-		}	
+		}
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Is Browser
 	 *
 	 * @access	public
 	 * @return	bool
-	 */		
+	 */
 	function is_browser()
 	{
 		return $this->is_browser;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Is Robot
 	 *
 	 * @access	public
 	 * @return	bool
-	 */		
+	 */
 	function is_robot()
 	{
 		return $this->is_robot;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Is Mobile
 	 *
 	 * @access	public
 	 * @return	bool
-	 */		
+	 */
 	function is_mobile()
 	{
 		return $this->is_mobile;
-	}	
+	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Is this a referral from another site?
 	 *
 	 * @access	public
 	 * @return	bool
-	 */			
+	 */
 	function is_referral()
 	{
 		return ( ! isset($_SERVER['HTTP_REFERER']) OR $_SERVER['HTTP_REFERER'] == '') ? FALSE : TRUE;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Agent String
 	 *
 	 * @access	public
 	 * @return	string
-	 */			
+	 */
 	function agent_string()
 	{
 		return $this->agent;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Get Platform
 	 *
 	 * @access	public
 	 * @return	string
-	 */			
+	 */
 	function platform()
 	{
 		return $this->platform;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Get Browser Name
 	 *
 	 * @access	public
 	 * @return	string
-	 */			
+	 */
 	function browser()
 	{
 		return $this->browser;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Get the Browser Version
 	 *
 	 * @access	public
 	 * @return	string
-	 */			
+	 */
 	function version()
 	{
 		return $this->version;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Get The Robot Name
 	 *
 	 * @access	public
 	 * @return	string
-	 */				
+	 */
 	function robot()
 	{
 		return $this->robot;
 	}
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Get the Mobile Device
 	 *
 	 * @access	public
 	 * @return	string
-	 */			
+	 */
 	function mobile()
 	{
 		return $this->mobile;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Get the referrer
 	 *
 	 * @access	public
 	 * @return	bool
-	 */			
+	 */
 	function referrer()
 	{
 		return ( ! isset($_SERVER['HTTP_REFERER']) OR $_SERVER['HTTP_REFERER'] == '') ? '' : trim($_SERVER['HTTP_REFERER']);
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Get the accepted languages
 	 *
 	 * @access	public
 	 * @return	array
-	 */			
+	 */
 	function languages()
 	{
 		if (count($this->languages) == 0)
 		{
 			$this->_set_languages();
 		}
-	
+
 		return $this->languages;
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Get the accepted Character Sets
 	 *
 	 * @access	public
 	 * @return	array
-	 */			
+	 */
 	function charsets()
 	{
 		if (count($this->charsets) == 0)
 		{
 			$this->_set_charsets();
 		}
-	
+
 		return $this->charsets;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Test for a particular language
 	 *
 	 * @access	public
 	 * @return	bool
-	 */			
+	 */
 	function accept_lang($lang = 'en')
 	{
 		return (in_array(strtolower($lang), $this->languages(), TRUE)) ? TRUE : FALSE;
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Test for a particular character set
 	 *
 	 * @access	public
 	 * @return	bool
-	 */			
+	 */
 	function accept_charset($charset = 'utf-8')
 	{
 		return (in_array(strtolower($charset), $this->charsets(), TRUE)) ? TRUE : FALSE;
 	}
-	
-	
+
+
 }
 
 
diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php
index ff03a50..54ee707 100644
--- a/system/libraries/Xmlrpc.php
+++ b/system/libraries/Xmlrpc.php
@@ -14,7 +14,7 @@
  */
 
 if ( ! function_exists('xml_parser_create'))
-{	
+{
 	show_error('Your PHP installation does not support XML');
 }
 
@@ -32,34 +32,34 @@
  */
 class CI_Xmlrpc {
 
-	var $debug			= FALSE; 	// Debugging on or off	
+	var $debug			= FALSE;	// Debugging on or off
 	var $xmlrpcI4		= 'i4';
 	var $xmlrpcInt		= 'int';
 	var $xmlrpcBoolean	= 'boolean';
-	var $xmlrpcDouble	= 'double';	
+	var $xmlrpcDouble	= 'double';
 	var $xmlrpcString	= 'string';
 	var $xmlrpcDateTime	= 'dateTime.iso8601';
 	var $xmlrpcBase64	= 'base64';
 	var $xmlrpcArray	= 'array';
 	var $xmlrpcStruct	= 'struct';
-	
+
 	var $xmlrpcTypes	= array();
 	var $valid_parents	= array();
 	var $xmlrpcerr		= array();	// Response numbers
 	var $xmlrpcstr		= array();  // Response strings
-	
+
 	var $xmlrpc_defencoding = 'UTF-8';
 	var $xmlrpcName			= 'XML-RPC for CodeIgniter';
 	var $xmlrpcVersion		= '1.1';
 	var $xmlrpcerruser		= 800; // Start of user errors
 	var $xmlrpcerrxml		= 100; // Start of XML Parse errors
 	var $xmlrpc_backslash	= ''; // formulate backslashes for escaping regexp
-	
+
 	var $client;
 	var $method;
 	var $data;
 	var $message			= '';
-	var $error				= '';  		// Error string for request
+	var $error				= '';		// Error string for request
 	var $result;
 	var $response			= array();  // Response from remote server
 
@@ -71,22 +71,22 @@
 
 	function CI_Xmlrpc ($config = array())
 	{
-		$this->xmlrpcName 		= $this->xmlrpcName;
+		$this->xmlrpcName		= $this->xmlrpcName;
 		$this->xmlrpc_backslash = chr(92).chr(92);
-		
+
 		// Types for info sent back and forth
 		$this->xmlrpcTypes = array(
-			$this->xmlrpcI4	   => '1',
-			$this->xmlrpcInt	  => '1',
-			$this->xmlrpcBoolean  => '1',
-			$this->xmlrpcString   => '1',
-			$this->xmlrpcDouble   => '1',
-			$this->xmlrpcDateTime => '1',
-			$this->xmlrpcBase64   => '1',
-			$this->xmlrpcArray	=> '2',
-			$this->xmlrpcStruct   => '3'
+			$this->xmlrpcI4	 		=> '1',
+			$this->xmlrpcInt		=> '1',
+			$this->xmlrpcBoolean	=> '1',
+			$this->xmlrpcString		=> '1',
+			$this->xmlrpcDouble		=> '1',
+			$this->xmlrpcDateTime	=> '1',
+			$this->xmlrpcBase64		=> '1',
+			$this->xmlrpcArray		=> '2',
+			$this->xmlrpcStruct		=> '3'
 			);
-			
+
 		// Array of Valid Parents for Various XML-RPC elements
 		$this->valid_parents = array('BOOLEAN'			=> array('VALUE'),
 									 'I4'				=> array('VALUE'),
@@ -106,8 +106,8 @@
 									 'FAULT'			=> array('METHODRESPONSE'),
 									 'VALUE'			=> array('MEMBER', 'DATA', 'PARAM', 'FAULT')
 									 );
-			
-			
+
+
 		// XML-RPC Responses
 		$this->xmlrpcerr['unknown_method'] = '1';
 		$this->xmlrpcstr['unknown_method'] = 'This is not a known method for this XML-RPC Server';
@@ -121,13 +121,13 @@
 		$this->xmlrpcstr['http_error'] = "Did not receive a '200 OK' response from remote server.";
 		$this->xmlrpcerr['no_data'] = '6';
 		$this->xmlrpcstr['no_data'] ='No data received from server.';
-		
+
 		$this->initialize($config);
-		
+
 		log_message('debug', "XML-RPC Class Initialized");
 	}
-	
-	
+
+
 	//-------------------------------------
 	//  Initialize Prefs
 	//-------------------------------------
@@ -140,13 +140,13 @@
 			{
 				if (isset($this->$key))
 				{
-					$this->$key = $val;			
+					$this->$key = $val;
 				}
 			}
 		}
 	}
 	// END
-	
+
 	//-------------------------------------
 	//  Take URL and parse it
 	//-------------------------------------
@@ -157,20 +157,20 @@
 		{
 			$url = "http://".$url;
 		}
-		
+
 		$parts = parse_url($url);
-		
+
 		$path = ( ! isset($parts['path'])) ? '/' : $parts['path'];
-		
+
 		if (isset($parts['query']) && $parts['query'] != '')
 		{
 			$path .= '?'.$parts['query'];
-		}	
-		
+		}
+
 		$this->client = new XML_RPC_Client($path, $parts['host'], $port);
 	}
 	// END
-	
+
 	//-------------------------------------
 	//  Set Timeout
 	//-------------------------------------
@@ -183,7 +183,7 @@
 		}
 	}
 	// END
-	
+
 	//-------------------------------------
 	//  Set Methods
 	//-------------------------------------
@@ -193,7 +193,7 @@
 		$this->method = $function;
 	}
 	// END
-	
+
 	//-------------------------------------
 	//  Take Array of Data and Create Objects
 	//-------------------------------------
@@ -204,17 +204,17 @@
 		{
 			// Send Error
 		}
-		
+
 		$this->data = array();
-		
+
 		foreach($incoming as $key => $value)
 		{
 			$this->data[$key] = $this->values_parsing($value);
 		}
 	}
 	// END
-	
-	
+
+
 	//-------------------------------------
 	//  Set Debug
 	//-------------------------------------
@@ -223,7 +223,7 @@
 	{
 		$this->debug = ($flag == TRUE) ? TRUE : FALSE;
 	}
-	
+
 	//-------------------------------------
 	//  Values Parsing
 	//-------------------------------------
@@ -249,7 +249,7 @@
 				{
 					$value['0'][$k] = $this->values_parsing($value['0'][$k], TRUE);
 				}
-				
+
 				$temp = new XML_RPC_Values($value['0'], $value['1']);
 			}
 			else
@@ -275,7 +275,7 @@
 	{
 		$this->message = new XML_RPC_Message($this->method,$this->data);
 		$this->message->debug = $this->debug;
-	
+
 		if ( ! $this->result = $this->client->send($this->message))
 		{
 			$this->error = $this->result->errstr;
@@ -286,13 +286,13 @@
 			$this->error = $this->result->errstr;
 			return FALSE;
 		}
-		
+
 		$this->response = $this->result->decode();
-		
+
 		return TRUE;
 	}
 	// END
-	
+
 	//-------------------------------------
 	//  Returns Error
 	//-------------------------------------
@@ -302,7 +302,7 @@
 		return $this->error;
 	}
 	// END
-	
+
 	//-------------------------------------
 	//  Returns Remote Server Response
 	//-------------------------------------
@@ -312,37 +312,37 @@
 		return $this->response;
 	}
 	// END
-	
+
 	//-------------------------------------
 	//  Sends an Error Message for Server Request
 	//-------------------------------------
-	
+
 	function send_error_message($number, $message)
 	{
 		return new XML_RPC_Response('0',$number, $message);
 	}
 	// END
-	
-	
+
+
 	//-------------------------------------
 	//  Send Response for Server Request
 	//-------------------------------------
-	
+
 	function send_response($response)
 	{
 		// $response should be array of values, which will be parsed
 		// based on their data and type into a valid group of XML-RPC values
-		
+
 		$response = $this->values_parsing($response);
-	
+
 		return new XML_RPC_Response($response);
 	}
 	// END
-	
+
 } // END XML_RPC Class
 
-	
-	
+
+
 /**
  * XML-RPC Client class
  *
@@ -363,12 +363,12 @@
 	function XML_RPC_Client($path, $server, $port=80)
 	{
 		parent::CI_Xmlrpc();
-		
+
 		$this->port = $port;
 		$this->server = $server;
 		$this->path = $path;
 	}
-	
+
 	function send($msg)
 	{
 		if (is_array($msg))
@@ -382,22 +382,22 @@
 	}
 
 	function sendPayload($msg)
-	{	
+	{
 		$fp = @fsockopen($this->server, $this->port,$this->errno, $this->errstr, $this->timeout);
-		
+
 		if ( ! is_resource($fp))
 		{
 			error_log($this->xmlrpcstr['http_error']);
 			$r = new XML_RPC_Response(0, $this->xmlrpcerr['http_error'],$this->xmlrpcstr['http_error']);
 			return $r;
 		}
-		
+
 		if(empty($msg->payload))
 		{
 			// $msg = XML_RPC_Messages
 			$msg->createPayload();
 		}
-		
+
 		$r = "\r\n";
 		$op  = "POST {$this->path} HTTP/1.0$r";
 		$op .= "Host: {$this->server}$r";
@@ -405,7 +405,7 @@
 		$op .= "User-Agent: {$this->xmlrpcName}$r";
 		$op .= "Content-Length: ".strlen($msg->payload). "$r$r";
 		$op .= $msg->payload;
-		
+
 
 		if ( ! fputs($fp, $op, strlen($op)))
 		{
@@ -437,7 +437,7 @@
 	var $xss_clean = TRUE;
 
 	function XML_RPC_Response($val, $code = 0, $fstr = '')
-	{	
+	{
 		if ($code != 0)
 		{
 			// error
@@ -470,7 +470,7 @@
 	{
 		return $this->val;
 	}
-	
+
 	function prepare_response()
 	{
 		$result = "<methodResponse>\n";
@@ -500,7 +500,7 @@
 		$result .= "\n</methodResponse>";
 		return $result;
 	}
-	
+
 	function decode($array=FALSE)
 	{
 		$CI =& get_instance();
@@ -523,13 +523,13 @@
 					$array[$key] = ($this->xss_clean) ? $CI->security->xss_clean($array[$key]) : $array[$key];
 				}
 			}
-			
+
 			$result = $array;
 		}
 		else
 		{
 			$result = $this->xmlrpc_decoder($this->val);
-			
+
 			if (is_array($result))
 			{
 				$result = $this->decode($result);
@@ -539,12 +539,12 @@
 				$result = ($this->xss_clean) ? $CI->security->xss_clean($result) : $result;
 			}
 		}
-		
+
 		return $result;
 	}
 
-	
-	
+
+
 	//-------------------------------------
 	//  XML-RPC Object to PHP Types
 	//-------------------------------------
@@ -562,7 +562,7 @@
 			reset($xmlrpc_val->me);
 			list($a,$b) = each($xmlrpc_val->me);
 			$size = count($b);
-			
+
 			$arr = array();
 
 			for($i = 0; $i < $size; $i++)
@@ -583,8 +583,8 @@
 			return $arr;
 		}
 	}
-	
-	
+
+
 	//-------------------------------------
 	//  ISO-8601 time to server or UTC time
 	//-------------------------------------
@@ -602,7 +602,7 @@
 		}
 		return $t;
 	}
-	
+
 } // End Response Class
 
 
@@ -619,12 +619,12 @@
 	var $payload;
 	var $method_name;
 	var $params			= array();
-	var $xh 			= array();
+	var $xh				= array();
 
 	function XML_RPC_Message($method, $pars=0)
 	{
 		parent::CI_Xmlrpc();
-		
+
 		$this->method_name = $method;
 		if (is_array($pars) && count($pars) > 0)
 		{
@@ -635,51 +635,51 @@
 			}
 		}
 	}
-	
+
 	//-------------------------------------
 	//  Create Payload to Send
 	//-------------------------------------
-	
+
 	function createPayload()
 	{
 		$this->payload = "<?xml version=\"1.0\"?".">\r\n<methodCall>\r\n";
 		$this->payload .= '<methodName>' . $this->method_name . "</methodName>\r\n";
 		$this->payload .= "<params>\r\n";
-		
+
 		for($i=0; $i<count($this->params); $i++)
 		{
 			// $p = XML_RPC_Values
 			$p = $this->params[$i];
 			$this->payload .= "<param>\r\n".$p->serialize_class()."</param>\r\n";
 		}
-		
+
 		$this->payload .= "</params>\r\n</methodCall>\r\n";
 	}
-	
+
 	//-------------------------------------
 	//  Parse External XML-RPC Server's Response
 	//-------------------------------------
-	
+
 	function parseResponse($fp)
 	{
 		$data = '';
-		
+
 		while($datum = fread($fp, 4096))
 		{
 			$data .= $datum;
 		}
-		
+
 		//-------------------------------------
 		//  DISPLAY HTTP CONTENT for DEBUGGING
 		//-------------------------------------
-		
+
 		if ($this->debug === TRUE)
 		{
 			echo "<pre>";
 			echo "---DATA---\n" . htmlspecialchars($data) . "\n---END DATA---\n\n";
 			echo "</pre>";
 		}
-		
+
 		//-------------------------------------
 		//  Check for data
 		//-------------------------------------
@@ -690,32 +690,32 @@
 			$r = new XML_RPC_Response(0, $this->xmlrpcerr['no_data'], $this->xmlrpcstr['no_data']);
 			return $r;
 		}
-		
-		
+
+
 		//-------------------------------------
 		//  Check for HTTP 200 Response
 		//-------------------------------------
-		
+
 		if (strncmp($data, 'HTTP', 4) == 0 && ! preg_match('/^HTTP\/[0-9\.]+ 200 /', $data))
 		{
 			$errstr= substr($data, 0, strpos($data, "\n")-1);
 			$r = new XML_RPC_Response(0, $this->xmlrpcerr['http_error'], $this->xmlrpcstr['http_error']. ' (' . $errstr . ')');
 			return $r;
 		}
-		
+
 		//-------------------------------------
 		//  Create and Set Up XML Parser
 		//-------------------------------------
-	
+
 		$parser = xml_parser_create($this->xmlrpc_defencoding);
 
-		$this->xh[$parser]				 = array();
-		$this->xh[$parser]['isf']		 = 0;
-		$this->xh[$parser]['ac']		 = '';
-		$this->xh[$parser]['headers'] 	 = array();
-		$this->xh[$parser]['stack']		 = array();
-		$this->xh[$parser]['valuestack'] = array();
-		$this->xh[$parser]['isf_reason'] = 0;
+		$this->xh[$parser]					= array();
+		$this->xh[$parser]['isf']			= 0;
+		$this->xh[$parser]['ac']			= '';
+		$this->xh[$parser]['headers']		= array();
+		$this->xh[$parser]['stack']			= array();
+		$this->xh[$parser]['valuestack']	= array();
+		$this->xh[$parser]['isf_reason']	= 0;
 
 		xml_set_object($parser, $this);
 		xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, true);
@@ -727,7 +727,7 @@
 		//-------------------------------------
 		//  GET HEADERS
 		//-------------------------------------
-		
+
 		$lines = explode("\r\n", $data);
 		while (($line = array_shift($lines)))
 		{
@@ -738,11 +738,11 @@
 			$this->xh[$parser]['headers'][] = $line;
 		}
 		$data = implode("\r\n", $lines);
-		
-		
+
+
 		//-------------------------------------
 		//  PARSE XML DATA
-		//-------------------------------------  	
+		//-------------------------------------
 
 		if ( ! xml_parse($parser, $data, count($data)))
 		{
@@ -755,11 +755,11 @@
 			return $r;
 		}
 		xml_parser_free($parser);
-		
+
 		// ---------------------------------------
 		//  Got Ourselves Some Badness, It Seems
 		// ---------------------------------------
-		
+
 		if ($this->xh[$parser]['isf'] > 1)
 		{
 			if ($this->debug === TRUE)
@@ -768,7 +768,7 @@
 				echo $this->xh[$parser]['isf_reason'];
 				echo "---Invalid Return---\n\n";
 			}
-				
+
 			$r = new XML_RPC_Response(0, $this->xmlrpcerr['invalid_return'],$this->xmlrpcstr['invalid_return'].' '.$this->xh[$parser]['isf_reason']);
 			return $r;
 		}
@@ -777,15 +777,15 @@
 			$r = new XML_RPC_Response(0, $this->xmlrpcerr['invalid_return'],$this->xmlrpcstr['invalid_return'].' '.$this->xh[$parser]['isf_reason']);
 			return $r;
 		}
-		
+
 		//-------------------------------------
 		//  DISPLAY XML CONTENT for DEBUGGING
-		//-------------------------------------  	
-		
+		//-------------------------------------
+
 		if ($this->debug === TRUE)
 		{
 			echo "<pre>";
-			
+
 			if (count($this->xh[$parser]['headers'] > 0))
 			{
 				echo "---HEADERS---\n";
@@ -795,20 +795,20 @@
 				}
 				echo "---END HEADERS---\n\n";
 			}
-			
+
 			echo "---DATA---\n" . htmlspecialchars($data) . "\n---END DATA---\n\n";
-			
+
 			echo "---PARSED---\n" ;
 			var_dump($this->xh[$parser]['value']);
 			echo "\n---END PARSED---</pre>";
 		}
-		
+
 		//-------------------------------------
 		//  SEND RESPONSE
 		//-------------------------------------
-		
+
 		$v = $this->xh[$parser]['value'];
-			
+
 		if ($this->xh[$parser]['isf'])
 		{
 			$errno_v = $v->me['struct']['faultCode'];
@@ -831,11 +831,11 @@
 		$r->headers = $this->xh[$parser]['headers'];
 		return $r;
 	}
-	
+
 	// ------------------------------------
 	//  Begin Return Message Parsing section
 	// ------------------------------------
-	
+
 	// quick explanation of components:
 	//   ac - used to accumulate values
 	//   isf - used to indicate a fault
@@ -854,9 +854,9 @@
 	{
 		// If invalid nesting, then return
 		if ($this->xh[$the_parser]['isf'] > 1) return;
-		
+
 		// Evaluate and check for correct nesting of XML elements
-		
+
 		if (count($this->xh[$the_parser]['stack']) == 0)
 		{
 			if ($name != 'METHODRESPONSE' && $name != 'METHODCALL')
@@ -876,16 +876,16 @@
 				return;
 			}
 		}
-		
+
 		switch($name)
 		{
 			case 'STRUCT':
 			case 'ARRAY':
 				// Creates array for child elements
-				
+
 				$cur_val = array('value' => array(),
 								 'type'	 => $name);
-								
+
 				array_unshift($this->xh[$the_parser]['valuestack'], $cur_val);
 			break;
 			case 'METHODNAME':
@@ -917,13 +917,13 @@
 					$this->xh[$the_parser]['isf_reason'] = "'Twas a $name element following a ".$this->xh[$the_parser]['vt']." element inside a single value";
 					return;
 				}
-				
+
 				$this->xh[$the_parser]['ac'] = '';
 			break;
 			case 'MEMBER':
 				// Set name of <member> to nothing to prevent errors later if no <name> is found
 				$this->xh[$the_parser]['valuestack'][0]['name'] = '';
-				
+
 				// Set NULL value to check to see if value passed for this param/member
 				$this->xh[$the_parser]['value'] = null;
 			break;
@@ -939,7 +939,7 @@
 				$this->xh[$the_parser]['isf_reason'] = "Invalid XML-RPC element found: $name";
 			break;
 		}
-		
+
 		// Add current element name to stack, to allow validation of nesting
 		array_unshift($this->xh[$the_parser]['stack'], $name);
 
@@ -955,14 +955,14 @@
 	function closing_tag($the_parser, $name)
 	{
 		if ($this->xh[$the_parser]['isf'] > 1) return;
-		
+
 		// Remove current element from stack and set variable
 		// NOTE: If the XML validates, then we do not have to worry about
 		// the opening and closing of elements.  Nesting is checked on the opening
 		// tag so we be safe there as well.
-		
+
 		$curr_elem = array_shift($this->xh[$the_parser]['stack']);
-	
+
 		switch($name)
 		{
 			case 'STRUCT':
@@ -982,7 +982,7 @@
 			case 'DATETIME.ISO8601':
 			case 'BASE64':
 				$this->xh[$the_parser]['vt'] = strtolower($name);
-				
+
 				if ($name == 'STRING')
 				{
 					$this->xh[$the_parser]['value'] = $this->xh[$the_parser]['ac'];
@@ -1044,10 +1044,10 @@
 					$this->xh[$the_parser]['value']	= $this->xh[$the_parser]['ac'];
 					$this->xh[$the_parser]['vt']	= $this->xmlrpcString;
 				}
-				
+
 				// build the XML-RPC value out of the data received, and substitute it
 				$temp = new XML_RPC_Values($this->xh[$the_parser]['value'], $this->xh[$the_parser]['vt']);
-				
+
 				if (count($this->xh[$the_parser]['valuestack']) && $this->xh[$the_parser]['valuestack'][0]['type'] == 'ARRAY')
 				{
 					// Array
@@ -1061,7 +1061,7 @@
 			break;
 			case 'MEMBER':
 				$this->xh[$the_parser]['ac']='';
-				
+
 				// If value add to array in the stack for the last element built
 				if ($this->xh[$the_parser]['value'])
 				{
@@ -1099,7 +1099,7 @@
 	function character_data($the_parser, $data)
 	{
 		if ($this->xh[$the_parser]['isf'] > 1) return; // XML Fault found already
-		
+
 		// If a value has not been found
 		if ($this->xh[$the_parser]['lv'] != 3)
 		{
@@ -1107,28 +1107,28 @@
 			{
 				$this->xh[$the_parser]['lv'] = 2; // Found a value
 			}
-				
+
 			if( ! @isset($this->xh[$the_parser]['ac']))
 			{
 				$this->xh[$the_parser]['ac'] = '';
 			}
-				
+
 			$this->xh[$the_parser]['ac'] .= $data;
 		}
 	}
-	
-	
+
+
 	function addParam($par) { $this->params[]=$par; }
-	
+
 	function output_parameters($array=FALSE)
 	{
-		$CI =& get_instance();	
+		$CI =& get_instance();
 
 		if ($this->xss_clean && ! isset($CI->security))
 		{
 			$CI->load->library('security');
 		}
-		
+
 		if ($array !== FALSE && is_array($array))
 		{
 			while (list($key) = each($array))
@@ -1144,17 +1144,17 @@
 					$array[$key] = ($key == 'bits' OR $this->xss_clean == FALSE) ? $array[$key] : $CI->security->xss_clean($array[$key]);
 				}
 			}
-			
+
 			$parameters = $array;
 		}
 		else
 		{
 			$parameters = array();
-		
+
 			for ($i = 0; $i < count($this->params); $i++)
 			{
 				$a_param = $this->decode_message($this->params[$i]);
-				
+
 				if (is_array($a_param))
 				{
 					$parameters[] = $this->output_parameters($a_param);
@@ -1163,13 +1163,13 @@
 				{
 					$parameters[] = ($this->xss_clean) ? $CI->security->xss_clean($a_param) : $a_param;
 				}
-			}	
+			}
 		}
-		
+
 		return $parameters;
 	}
-	
-	
+
+
 	function decode_message($param)
 	{
 		$kind = $param->kindOf();
@@ -1182,31 +1182,31 @@
 		{
 			reset($param->me);
 			list($a,$b) = each($param->me);
-			
+
 			$arr = array();
 
 			for($i = 0; $i < count($b); $i++)
 			{
 				$arr[] = $this->decode_message($param->me['array'][$i]);
 			}
-			
+
 			return $arr;
 		}
 		elseif($kind == 'struct')
 		{
 			reset($param->me['struct']);
-			
+
 			$arr = array();
 
 			while(list($key,$value) = each($param->me['struct']))
 			{
 				$arr[$key] = $this->decode_message($value);
 			}
-			
+
 			return $arr;
 		}
 	}
-	
+
 } // End XML_RPC_Messages class
 
 
@@ -1220,17 +1220,17 @@
  */
 class XML_RPC_Values extends CI_Xmlrpc
 {
-	var $me 	= array();
+	var $me		= array();
 	var $mytype	= 0;
 
 	function XML_RPC_Values($val=-1, $type='')
-	{	
+	{
 		parent::CI_Xmlrpc();
-		
+
 		if ($val != -1 OR $type != '')
 		{
 			$type = $type == '' ? 'string' : $type;
-			
+
 			if ($this->xmlrpcTypes[$type] == 1)
 			{
 				$this->addScalar($val,$type);
@@ -1249,13 +1249,13 @@
 	function addScalar($val, $type='string')
 	{
 		$typeof = $this->xmlrpcTypes[$type];
-		
+
 		if ($this->mytype==1)
 		{
 			echo '<strong>XML_RPC_Values</strong>: scalar can have only one value<br />';
 			return 0;
 		}
-		
+
 		if ($typeof != 1)
 		{
 			echo '<strong>XML_RPC_Values</strong>: not a scalar type (${typeof})<br />';
@@ -1392,12 +1392,12 @@
 	{
 		$ar = $o->me;
 		reset($ar);
-		
+
 		list($typ, $val) = each($ar);
 		$rs = "<value>\n".$this->serializedata($typ, $val)."</value>\n";
 		return $rs;
 	}
-	
+
 	function scalarval()
 	{
 		reset($this->me);
@@ -1409,11 +1409,11 @@
 	//-------------------------------------
 	// Encode time in ISO-8601 form.
 	//-------------------------------------
-	
+
 	// Useful for sending time in XML-RPC
 
 	function iso8601_encode($time, $utc=0)
-	{	
+	{
 		if ($utc == 1)
 		{
 			$t = strftime("%Y%m%dT%H:%M:%S", $time);
@@ -1427,7 +1427,7 @@
 		}
 		return $t;
 	}
-	
+
 }
 // END XML_RPC_Values Class
 
diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php
index c1fe649..56fd655 100644
--- a/system/libraries/Xmlrpcs.php
+++ b/system/libraries/Xmlrpcs.php
@@ -14,7 +14,7 @@
  */
 
 if ( ! function_exists('xml_parser_create'))
-{	
+{
 	show_error('Your PHP installation does not support XML');
 }
 
@@ -36,11 +36,11 @@
  */
 class CI_Xmlrpcs extends CI_Xmlrpc
 {
-	var $methods		= array(); 	//array of methods mapped to function names and signatures
+	var $methods		= array();	//array of methods mapped to function names and signatures
 	var $debug_msg		= '';		// Debug Message
-	var $system_methods = array(); // XML RPC Server methods
+	var $system_methods = array();	// XML RPC Server methods
 	var $controller_obj;
-	
+
 	var $object			= FALSE;
 
 
@@ -49,49 +49,49 @@
 	//-------------------------------------
 
 	function CI_Xmlrpcs($config=array())
-	{	
+	{
 		parent::CI_Xmlrpc();
 		$this->set_system_methods();
-	
+
 		if (isset($config['functions']) && is_array($config['functions']))
 		{
 			$this->methods = array_merge($this->methods, $config['functions']);
 		}
-		
+
 		log_message('debug', "XML-RPC Server Class Initialized");
 	}
-	
+
 	//-------------------------------------
 	//  Initialize Prefs and Serve
 	//-------------------------------------
-	
+
 	function initialize($config=array())
-	{	
+	{
 		if (isset($config['functions']) && is_array($config['functions']))
 		{
 			$this->methods = array_merge($this->methods, $config['functions']);
 		}
-		
+
 		if (isset($config['debug']))
 		{
 			$this->debug = $config['debug'];
 		}
-		
+
 		if (isset($config['object']) && is_object($config['object']))
 		{
 			$this->object = $config['object'];
 		}
-		
+
 		if (isset($config['xss_clean']))
 		{
 			$this->xss_clean = $config['xss_clean'];
 		}
 	}
-	
+
 	//-------------------------------------
 	//  Setting of System Methods
 	//-------------------------------------
-	
+
 	function set_system_methods ()
 	{
 		$this->methods = array(
@@ -118,14 +118,14 @@
 	//-------------------------------------
 	//  Main Server Function
 	//-------------------------------------
-	
+
 	function serve()
 	{
 		$r = $this->parseRequest();
 		$payload  = '<?xml version="1.0" encoding="'.$this->xmlrpc_defencoding.'"?'.'>'."\n";
 		$payload .= $this->debug_msg;
 		$payload .= $r->prepare_response();
-		
+
 		header("Content-Type: text/xml");
 		header("Content-Length: ".strlen($payload));
 		exit($payload);
@@ -134,7 +134,7 @@
 	//-------------------------------------
 	//  Add Method to Class
 	//-------------------------------------
-	
+
 	function add_to_map($methodname,$function,$sig,$doc)
 	{
 		$this->methods[$methodname] = array(
@@ -148,11 +148,11 @@
 	//-------------------------------------
 	//  Parse Server Request
 	//-------------------------------------
-	
+
 	function parseRequest($data='')
 	{
 		global $HTTP_RAW_POST_DATA;
-		
+
 		//-------------------------------------
 		//  Get Data
 		//-------------------------------------
@@ -165,10 +165,10 @@
 		//-------------------------------------
 		//  Set up XML Parser
 		//-------------------------------------
-		
+
 		$parser = xml_parser_create($this->xmlrpc_defencoding);
 		$parser_object = new XML_RPC_Message("filler");
-		
+
 		$parser_object->xh[$parser]					= array();
 		$parser_object->xh[$parser]['isf']			= 0;
 		$parser_object->xh[$parser]['isf_reason']	= '';
@@ -182,12 +182,12 @@
 		xml_set_element_handler($parser, 'open_tag', 'closing_tag');
 		xml_set_character_data_handler($parser, 'character_data');
 		//xml_set_default_handler($parser, 'default_handler');
-		
-		
+
+
 		//-------------------------------------
 		//  PARSE + PROCESS XML DATA
-		//-------------------------------------  	
-		
+		//-------------------------------------
+
 		if ( ! xml_parse($parser, $data, 1))
 		{
 			// return XML error as a faultCode
@@ -205,53 +205,53 @@
 		else
 		{
 			xml_parser_free($parser);
-			
+
 			$m = new XML_RPC_Message($parser_object->xh[$parser]['method']);
 			$plist='';
-			
+
 			for($i=0; $i < count($parser_object->xh[$parser]['params']); $i++)
 			{
 				if ($this->debug === TRUE)
 				{
 					$plist .= "$i - " .  print_r(get_object_vars($parser_object->xh[$parser]['params'][$i]), TRUE). ";\n";
 				}
-				
+
 				$m->addParam($parser_object->xh[$parser]['params'][$i]);
 			}
-			
+
 			if ($this->debug === TRUE)
 			{
 				echo "<pre>";
 				echo "---PLIST---\n" . $plist . "\n---PLIST END---\n\n";
 				echo "</pre>";
 			}
-			
+
 			$r = $this->_execute($m);
 		}
-		
+
 		//-------------------------------------
 		//  SET DEBUGGING MESSAGE
-		//-------------------------------------  	
-		
+		//-------------------------------------
+
 		if ($this->debug === TRUE)
 		{
 			$this->debug_msg = "<!-- DEBUG INFO:\n\n".$plist."\n END DEBUG-->\n";
 		}
-		
+
 		return $r;
 	}
 
 	//-------------------------------------
 	//  Executes the Method
 	//-------------------------------------
-	
+
 	function _execute($m)
 	{
 		$methName = $m->method_name;
-		
+
 		// Check to see if it is a system call
 		$system_call = (strncmp($methName, 'system', 5) == 0) ? TRUE : FALSE;
-		
+
 		if ($this->xss_clean == FALSE)
 		{
 			$m->xss_clean = FALSE;
@@ -260,19 +260,19 @@
 		//-------------------------------------
 		//  Valid Method
 		//-------------------------------------
-		
+
 		if ( ! isset($this->methods[$methName]['function']))
 		{
 			return new XML_RPC_Response(0, $this->xmlrpcerr['unknown_method'], $this->xmlrpcstr['unknown_method']);
 		}
-		
+
 		//-------------------------------------
 		//  Check for Method (and Object)
 		//-------------------------------------
-			
+
 		$method_parts = explode(".", $this->methods[$methName]['function']);
 		$objectCall = (isset($method_parts['1']) && $method_parts['1'] != "") ? TRUE : FALSE;
-		
+
 		if ($system_call === TRUE)
 		{
 			if ( ! is_callable(array($this,$method_parts['1'])))
@@ -291,30 +291,30 @@
 				return new XML_RPC_Response(0, $this->xmlrpcerr['unknown_method'], $this->xmlrpcstr['unknown_method']);
 			}
 		}
-		
+
 		//-------------------------------------
 		//  Checking Methods Signature
 		//-------------------------------------
-		
+
 		if (isset($this->methods[$methName]['signature']))
 		{
 			$sig = $this->methods[$methName]['signature'];
 			for($i=0; $i<count($sig); $i++)
 			{
 				$current_sig = $sig[$i];
-		
+
 				if (count($current_sig) == count($m->params)+1)
 				{
 					for($n=0; $n < count($m->params); $n++)
 					{
 						$p = $m->params[$n];
 						$pt = ($p->kindOf() == 'scalar') ? $p->scalarval() : $p->kindOf();
-						
+
 						if ($pt != $current_sig[$n+1])
 						{
 							$pno = $n+1;
 							$wanted = $current_sig[$n+1];
-							
+
 							return new XML_RPC_Response(0,
 								$this->xmlrpcerr['incorrect_params'],
 								$this->xmlrpcstr['incorrect_params'] .
@@ -354,22 +354,22 @@
 			return call_user_func($this->methods[$methName]['function'], $m);
 		}
 	}
-	
-	
+
+
 	//-------------------------------------
 	//  Server Function:  List Methods
 	//-------------------------------------
-	
+
 	function listMethods($m)
 	{
 		$v = new XML_RPC_Values();
 		$output = array();
-		
+
 		foreach($this->methods as $key => $value)
 		{
 			$output[] = new XML_RPC_Values($key, 'string');
 		}
-		
+
 		foreach($this->system_methods as $key => $value)
 		{
 			$output[]= new XML_RPC_Values($key, 'string');
@@ -378,23 +378,23 @@
 		$v->addArray($output);
 		return new XML_RPC_Response($v);
 	}
-	
+
 	//-------------------------------------
 	//  Server Function:  Return Signature for Method
 	//-------------------------------------
-		
+
 	function methodSignature($m)
 	{
 		$parameters = $m->output_parameters();
 		$method_name = $parameters[0];
-		
+
 		if (isset($this->methods[$method_name]))
 		{
 			if ($this->methods[$method_name]['signature'])
 			{
 				$sigs = array();
 				$signature = $this->methods[$method_name]['signature'];
-				
+
 				for($i=0; $i < count($signature); $i++)
 				{
 					$cursig = array();
@@ -418,20 +418,20 @@
 		}
 		return $r;
 	}
-	
+
 	//-------------------------------------
 	//  Server Function:  Doc String for Method
 	//-------------------------------------
-	
+
 	function methodHelp($m)
 	{
 		$parameters = $m->output_parameters();
 		$method_name = $parameters[0];
-	
+
 		if (isset($this->methods[$method_name]))
 		{
 			$docstring = isset($this->methods[$method_name]['docstring']) ? $this->methods[$method_name]['docstring'] : '';
-			
+
 			return new XML_RPC_Response(new XML_RPC_Values($docstring, 'string'));
 		}
 		else
@@ -448,7 +448,7 @@
 	{
 		// Disabled
 		return new XML_RPC_Response(0, $this->xmlrpcerr['unknown_method'], $this->xmlrpcstr['unknown_method']);
-		
+
 		$parameters = $m->output_parameters();
 		$calls = $parameters[0];
 
@@ -457,15 +457,15 @@
 		foreach ($calls as $value)
 		{
 			//$attempt = $this->_execute(new XML_RPC_Message($value[0], $value[1]));
-			
+
 			$m = new XML_RPC_Message($value[0]);
 			$plist='';
-			
+
 			for($i=0; $i < count($value[1]); $i++)
 			{
 				$m->addParam(new XML_RPC_Values($value[1][$i], 'string'));
 			}
-			
+
 			$attempt = $this->_execute($m);
 
 			if ($attempt->faultCode() != 0)
@@ -478,8 +478,8 @@
 
 		return new XML_RPC_Response(new XML_RPC_Values($result, 'array'));
 	}
-	
-	
+
+
 	//-------------------------------------
 	//  Multi-call Function:  Error Handling
 	//-------------------------------------
@@ -488,28 +488,28 @@
 	{
 		$str  = is_string($err) ? $this->xmlrpcstr["multicall_${err}"] : $err->faultString();
 		$code = is_string($err) ? $this->xmlrpcerr["multicall_${err}"] : $err->faultCode();
-		
+
 		$struct['faultCode'] = new XML_RPC_Values($code, 'int');
 		$struct['faultString'] = new XML_RPC_Values($str, 'string');
-	
+
 		return new XML_RPC_Values($struct, 'struct');
 	}
-	
-	
+
+
 	//-------------------------------------
 	//  Multi-call Function:  Processes method
 	//-------------------------------------
-	
+
 	function do_multicall($call)
 	{
 		if ($call->kindOf() != 'struct')
 			return $this->multicall_error('notstruct');
 		elseif ( ! $methName = $call->me['struct']['methodName'])
 			return $this->multicall_error('nomethod');
-		
+
 		list($scalar_type,$scalar_value)=each($methName->me);
 		$scalar_type = $scalar_type == $this->xmlrpcI4 ? $this->xmlrpcInt : $scalar_type;
-			
+
 		if ($methName->kindOf() != 'scalar' OR $scalar_type != 'string')
 			return $this->multicall_error('notstring');
 		elseif ($scalar_value == 'system.multicall')
@@ -518,7 +518,7 @@
 			return $this->multicall_error('noparams');
 		elseif ($params->kindOf() != 'array')
 			return $this->multicall_error('notarray');
-			
+
 		list($a,$b)=each($params->me);
 		$numParams = count($b);
 
@@ -536,8 +536,8 @@
 		}
 
 		return new XML_RPC_Values(array($result->value()), 'array');
-	}	
-	
+	}
+
 }
 // END XML_RPC_Server class
 
diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php
index 92dfc81..da3e5eb 100644
--- a/system/libraries/Zip.php
+++ b/system/libraries/Zip.php
@@ -32,17 +32,17 @@
  */
 class CI_Zip  {
 
-	var $zipdata 	= '';
-	var $directory 	= '';
-	var $entries 	= 0;
-	var $file_num 	= 0;
+	var $zipdata	= '';
+	var $directory	= '';
+	var $entries	= 0;
+	var $file_num	= 0;
 	var $offset		= 0;
 	var $now;
 
 	function CI_Zip()
 	{
 		log_message('debug', "Zip Compression Class Initialized");
-		
+
 		$this->now = time();
 	}
 
@@ -72,24 +72,24 @@
 		}
 	}
 
-	// --------------------------------------------------------------------	
+	// --------------------------------------------------------------------
 
 	/**
 	 *	Get file/directory modification time
-	 *	
+	 *
 	 *	If this is a newly created file/dir, we will set the time to 'now'
 	 *
 	 *	@param string	path to file
-	 *	@return array 	filemtime/filemdate
+	 *	@return array	filemtime/filemdate
 	 */
 	function _get_mod_time($dir)
 	{
 		// filemtime() will return false, but it does raise an error.
-		$date = (@filemtime($dir)) ? filemtime($dir) : getdate($this->now); 
+		$date = (@filemtime($dir)) ? filemtime($dir) : getdate($this->now);
 
 		$time['file_mtime'] = ($date['hours'] << 11) + ($date['minutes'] << 5) + $date['seconds'] / 2;
 		$time['file_mdate'] = (($date['year'] - 1980) << 9) + ($date['mon'] << 5) + $date['mday'];
-		
+
 		return $time;
 	}
 
@@ -103,7 +103,7 @@
 	 * @return	void
 	 */
 	function _add_dir($dir, $file_mtime, $file_mdate)
-	{		
+	{
 		$dir = str_replace("\\", "/", $dir);
 
 		$this->zipdata .=
@@ -140,7 +140,7 @@
 		$this->offset = strlen($this->zipdata);
 		$this->entries++;
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -154,14 +154,14 @@
 	 * @param	mixed
 	 * @param	string
 	 * @return	void
-	 */	
+	 */
 	function add_data($filepath, $data = NULL)
-	{	
+	{
 		if (is_array($filepath))
 		{
 			foreach ($filepath as $path => $data)
 			{
-				$file_data = $this->_get_mod_time($path);	
+				$file_data = $this->_get_mod_time($path);
 
 				$this->_add_data($path, $data, $file_data['file_mtime'], $file_data['file_mdate']);
 			}
@@ -169,7 +169,7 @@
 		else
 		{
 			$file_data = $this->_get_mod_time($filepath);
-			
+
 			$this->_add_data($filepath, $data, $file_data['file_mtime'], $file_data['file_mdate']);
 		}
 	}
@@ -183,7 +183,7 @@
 	 * @param	string	the file name/path
 	 * @param	string	the data to be encoded
 	 * @return	void
-	 */	
+	 */
 	function _add_data($filepath, $data, $file_mtime, $file_mdate)
 	{
 		$filepath = str_replace("\\", "/", $filepath);
@@ -227,7 +227,7 @@
 		$this->entries++;
 		$this->file_num++;
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -235,7 +235,7 @@
 	 *
 	 * @access	public
 	 * @return	bool
-	 */	
+	 */
 	function read_file($path, $preserve_filepath = FALSE)
 	{
 		if ( ! file_exists($path))
@@ -246,7 +246,7 @@
 		if (FALSE !== ($data = file_get_contents($path)))
 		{
 			$name = str_replace("\\", "/", $path);
-			
+
 			if ($preserve_filepath === FALSE)
 			{
 				$name = preg_replace("|.*/(.+)|", "\\1", $name);
@@ -259,7 +259,7 @@
 	}
 
 	// ------------------------------------------------------------------------
-	
+
 	/**
 	 * Read a directory and add it to the zip.
 	 *
@@ -321,7 +321,7 @@
 	 *
 	 * @access	public
 	 * @return	binary string
-	 */	
+	 */
 	function get_zip()
 	{
 		// Is there any data to return?
@@ -340,7 +340,7 @@
 
 		return $zip_data;
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -351,7 +351,7 @@
 	 * @access	public
 	 * @param	string	the file name
 	 * @return	bool
-	 */	
+	 */
 	function archive($filepath)
 	{
 		if ( ! ($fp = @fopen($filepath, FOPEN_WRITE_CREATE_DESTRUCTIVE)))
@@ -359,12 +359,12 @@
 			return FALSE;
 		}
 
-		flock($fp, LOCK_EX);	
+		flock($fp, LOCK_EX);
 		fwrite($fp, $this->get_zip());
 		flock($fp, LOCK_UN);
 		fclose($fp);
 
-		return TRUE;	
+		return TRUE;
 	}
 
 	// --------------------------------------------------------------------
@@ -404,7 +404,7 @@
 	 *
 	 * @access	public
 	 * @return	void
-	 */		
+	 */
 	function clear_data()
 	{
 		$this->zipdata		= '';
@@ -413,7 +413,7 @@
 		$this->file_num		= 0;
 		$this->offset		= 0;
 	}
-	
+
 }
 
 /* End of file Zip.php */
diff --git a/system/libraries/javascript/Jquery.php b/system/libraries/javascript/Jquery.php
index f6b8dce..db80c14 100644
--- a/system/libraries/javascript/Jquery.php
+++ b/system/libraries/javascript/Jquery.php
@@ -173,7 +173,7 @@
 	 * @param	string	- element
 	 * @param	string	- Javascript code for mouse over
 	 * @param	string	- Javascript code for mouse out
- 	 * @return	string
+	 * @return	string
 	 */
 	function _hover($element = 'this', $over, $out)
 	{
@@ -390,7 +390,7 @@
 	 *
 	 * @access	private
 	 * @param	string	- element
- 	 * @return	string
+	 * @return	string
 	 */
 	function _addClass($element = 'this', $class='')
 	{
@@ -410,7 +410,7 @@
 	 * @param	string	- element
 	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
 	 * @param	string	- Javascript callback function
- 	 * @return	string
+	 * @return	string
 	 */
 	function _animate($element = 'this', $params = array(), $speed = '', $extra = '')
 	{
@@ -452,7 +452,7 @@
 	 * @param	string	- element
 	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
 	 * @param	string	- Javascript callback function
- 	 * @return	string
+	 * @return	string
 	 */
 	function _fadeIn($element = 'this', $speed = '', $callback = '')
 	{
@@ -480,7 +480,7 @@
 	 * @param	string	- element
 	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
 	 * @param	string	- Javascript callback function
- 	 * @return	string
+	 * @return	string
 	 */
 	function _fadeOut($element = 'this', $speed = '', $callback = '')
 	{
@@ -508,7 +508,7 @@
 	 * @param	string	- element
 	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
 	 * @param	string	- Javascript callback function
- 	 * @return	string
+	 * @return	string
 	 */
 	function _hide($element = 'this', $speed = '', $callback = '')
 	{
@@ -534,7 +534,7 @@
 	 *
 	 * @access	private
 	 * @param	string	- element
- 	 * @return	string
+	 * @return	string
 	 */
 	function _removeClass($element = 'this', $class='')
 	{
@@ -554,7 +554,7 @@
 	 * @param	string	- element
 	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
 	 * @param	string	- Javascript callback function
- 	 * @return	string
+	 * @return	string
 	 */
 	function _slideUp($element = 'this', $speed = '', $callback = '')
 	{
@@ -582,7 +582,7 @@
 	 * @param	string	- element
 	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
 	 * @param	string	- Javascript callback function
- 	 * @return	string
+	 * @return	string
 	 */
 	function _slideDown($element = 'this', $speed = '', $callback = '')
 	{
@@ -610,7 +610,7 @@
 	 * @param	string	- element
 	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
 	 * @param	string	- Javascript callback function
- 	 * @return	string
+	 * @return	string
 	 */
 	function _slideToggle($element = 'this', $speed = '', $callback = '')
 	{
@@ -636,7 +636,7 @@
 	 *
 	 * @access	private
 	 * @param	string	- element
- 	 * @return	string
+	 * @return	string
 	 */
 	function _toggle($element = 'this')
 	{
@@ -654,7 +654,7 @@
 	 *
 	 * @access	private
 	 * @param	string	- element
- 	 * @return	string
+	 * @return	string
 	 */
 	function _toggleClass($element = 'this', $class='')
 	{
@@ -674,7 +674,7 @@
 	 * @param	string	- element
 	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
 	 * @param	string	- Javascript callback function
- 	 * @return	string
+	 * @return	string
 	 */
 	function _show($element = 'this', $speed = '', $callback = '')
 	{
@@ -884,7 +884,7 @@
 	}
 
 	// --------------------------------------------------------------------
-		 
+
 	/**
 	 * Table Sorter Plugin
 	 *
